mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Fix sidebar styling when browser window is too small
This commit is contained in:
parent
af2fdc03a6
commit
4d22a65e78
|
@ -303,3 +303,7 @@ table {
|
|||
border-color: white;
|
||||
margin-bottom: 0.6em;
|
||||
}
|
||||
|
||||
.side-nav {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user