Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic navbar height #26

Open
morrow95 opened this issue Mar 29, 2016 · 1 comment
Open

dynamic navbar height #26

morrow95 opened this issue Mar 29, 2016 · 1 comment

Comments

@morrow95
Copy link

Trying something new and running into an issue with the height calculation. Basically if you are at the top of the page the navbar is 100 pixels high, but as you scroll down (past 100 pixels) it becomes smaller to 50 pixels high when shown. I've seen a lot of sites do this to make the navbar, logo, etc stand out on page load, but as the user is scrolling through content it becomes shorter as to not take valuable space from viewing.

To do this I am using some simple js and css media queries. After looking at the code it seems like the navbar height is only calculated once, therefore, any dynamic changes in the height through css aren't picked up. If the height was 100px when jquery.bootstrap-autohidingnavbar.js loads then it will always be 100px. Of course, I can't manually set the hideOffset value either because it is dynamic. I understand the 'auto' value automatically calculates, but I thought maybe it would do so dynamically.

@istvan-ujjmeszaros
Copy link
Owner

The navbar height is calculated dynamically on line 35, so it should work. Can you link a page where I can see the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants