Guest User

Untitled

a guest
Dec 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. body {
  2. padding-top: 65px;
  3. }
  4.  
  5. #godown{
  6. height: 60px;
  7. }
  8.  
  9. <body>
  10. <nav class="navbar navbar-fixed-top " role="navigation" id="navMenu">
  11. ...
  12.  
  13. </nav>
  14.  
  15. <!-- This div make the magic :) -->
  16.  
  17. <div class="godown-60" id="godown"></div>
  18.  
  19. <!-- the rest of your site -->
  20. ...
  21.  
  22. <script>
  23. //insert this in your jquery
  24. //control the resizing of menu and go down the content in the correct position
  25.  
  26. $("#navMenu").resize(function () {
  27. $('#godown').height($("#navMenu").height() + 10);
  28. });
  29.  
  30. if ($("#navMenu").height() > $('#godown').height()) $('#godown').height($("#navMenu").height() + 10);
  31.  
  32. </script>
  33.  
  34. // add appropriate media query if required to target mobile nav only
  35. .nav { overflow-y: hidden !important }
Add Comment
Please, Sign In to add comment