When I scrolled down site display black menu bar at the top look like float bar. but I think there's jquery involved with this. I have tried CSS but seems not working for me like the way i want it to
#menucontainer {
position:fixed;
top:0;
height: 250px
}
#firstElement {
margin-top: 250px
}
Here is the website basic idea of what I would like the menu to be like:
Wrap your menu in an div or section with an ID or class.
Can't remember where I got this from, so no salutations to me, but it worked for me.
i think that use Twitter Bootstrap can help you.
Look at Navbar in bootstrap and search for "Fixed to top"
Edit: If you want something like you post, combine with something like this Leave menu bar fixed on top when scrolled .
When the menu has top offset equals something add class ".navbar-fixed-top".
Try this
CSS
JavaScript
:
HTML
In the URL that you provide, I see a menu bar fixed on the top of browser while you scroll down several lines of the page.
So I separate your problem to 2 questions: First, how to make a fixed top menu which won't be disappear when scroll the page. Second, how to make a menu fixed on top after scrolling down few lines.
For the first question, I change your css code.
And I think the second question need to write js. Well I don't know yet.
I tried many times for the solution @Kortschot provided, while finally it turned out to be that this solution wasn't ideal for my situation.
Here is my problem when using the solution @Kortschot provided :
Here is my solution which can do all the work in just one script (using 1.7+ jquery):