Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body {
- padding-top: 65px;
- }
- #godown{
- height: 60px;
- }
- <body>
- <nav class="navbar navbar-fixed-top " role="navigation" id="navMenu">
- ...
- </nav>
- <!-- This div make the magic :) -->
- <div class="godown-60" id="godown"></div>
- <!-- the rest of your site -->
- ...
- <script>
- //insert this in your jquery
- //control the resizing of menu and go down the content in the correct position
- $("#navMenu").resize(function () {
- $('#godown').height($("#navMenu").height() + 10);
- });
- if ($("#navMenu").height() > $('#godown').height()) $('#godown').height($("#navMenu").height() + 10);
- </script>
- // add appropriate media query if required to target mobile nav only
- .nav { overflow-y: hidden !important }
Add Comment
Please, Sign In to add comment