I have a menu bar on the top of the screen, after the header. When I have no transforms set on the body, my code works fine and when you scroll below the menu bar it turns into a navigation bar and comes as a fixed bar on the top of the screen.
However, if I apply a transform to body like this:
-webkit-transform: scale(0.9);
-moz-transform: scale(0.9);
-ms-transform: scale(0.9);
-o-transform: scale(0.9);
transform: scale(0.9);
then my website looks better, but when scrolling to the menu bar, it does not become fixed and on top of the screen, it actually moves to the top of the html page instead of the top of the current scrolling area.
Any idea why that could be the case?
#main-menu.isfixed {
background: inherit;
position: fixed;
display: block;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
Thanks