diff options
| author | Tom Christie | 2013-06-26 23:26:35 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-06-26 23:26:35 +0100 | 
| commit | 4d22a65e78432a2aa70ddc80395a014a7c9e299e (patch) | |
| tree | 59c48522448f9a05d896d94e1bbaac3f14c06520 /docs/template.html | |
| parent | af2fdc03a6f4cafe6e2f19b2adcf59c8918088f2 (diff) | |
| download | django-rest-framework-4d22a65e78432a2aa70ddc80395a014a7c9e299e.tar.bz2 | |
Fix sidebar styling when browser window is too small
Diffstat (limited to 'docs/template.html')
| -rw-r--r-- | docs/template.html | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/template.html b/docs/template.html index 53656e7d..14ecc9c7 100644 --- a/docs/template.html +++ b/docs/template.html @@ -198,5 +198,14 @@        $('.dropdown-menu').on('click touchstart', function(event) {          event.stopPropagation();        }); + +      // Dynamically force sidenav to no higher than browser window +      $('.side-nav').css('max-height', window.innerHeight - 125); + +      $(function(){ +        $(window).resize(function(){ +          $('.side-nav').css('max-height', window.innerHeight - 125); +        }); +      });      </script>  </body></html>  | 
