Problems with Bootstrap nav already opened when I resize the browser

So, I have this problem: my Bootstrap nav -when I resize the browser - is open by default when it should be closed.
You can check it here: http://www.klayz.com/community/. Resize the browser and you’ll see. Some suggestions on how to fix this?

I’m still having this problem… :confounded:

Show us the code here then we can help you

I don’t think it’s open as such, it’s just going from a horizontal layout for the menu options to a vertical one. What do you want it to do?

Hi,

You seem to be duplicating the css in 2 styleblocks inside the body although that has nothing to do with the issue. Remember css should not be in the body although it will do no harm but is invalid.

You can hide the menu by adding the following code after the original CSS.

@media screen and (max-width:768px){
	.navbar-toggle{z-index:999}
	.navbar-collapse.collapse{overflow:hidden;height:0;}
	.navbar-collapse.collapse.in{height:auto;}
	.navbar-fixed-top .navbar-collapse {max-height:none}
}

You shouldn’t really have needed it but I guess you were over-riding the standard behaviour somewhere but there was too much code for me to look through so I just fixed it :smile:

1 Like

Thank you so much PaulOB! Now it works correctly!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.