I successfully created a navigation menu using ul > li
.
Currently, the menu is positioned in the center of the page.
My goal is to make the menu stay at the top of the page only while scrolling.
I know I can achieve this using css
.menu {
position:fixed;
top:0;
float:left;
}
.menu li {
float:left;
padding:10px;
margin:2px;
}
However, I am looking for a solution that will only apply this change when scrolling. Any suggestions?