Can someone help me with this issue?
I'm trying to create a full-width bar menu by setting a large margin on the right and left. I've used overflow-x: hidden
to hide the excess margin, and visually everything looks fine with no scroll bars.
However, when I drag the page (using Mac Lion) or scroll to the right, an enormous bar appears that should have been cropped by the overflow-x:hidden
.
CSS
html {
margin:0;
padding:0;
overflow-x:hidden;
}
body {
margin: 0 auto;
width: 950px;
}
.full, .f_right {
margin-right: -3000px !important;
padding-right: 3000px !important;
}
.full, .f_left {
margin-left: -3000px !important;
padding-left: 3000px !important;
}
For reference, here is a link to my code: http://jsfiddle.net/NicosKaralis/PcLed/1/
If you open it in draft mode, the jsfiddle CSS seems to somehow resolve the issue.
@Krazer
My HTML structure looks like this:
body
div#container
div#menu_bar
div#links
div#full_bar
div#content_body
...
The #container is a centered div with a fixed width of 950px, and the #full_bar is a bar that should span the entire window width.
When I set the width of #full_bar to 100%, it only takes the inner width and not the full window width.