Basically I have a div with this CSS:
.mydiv{
position:absolute;
top:0;
left:0;
width:100%;
padding:7px;
}
The browser shows the horizontal due to padding (width 100% + 7px)
Take a look here: http://jsfiddle.net/3FrLq/
How can I have that div not showing the horizontal bar? (Without having to add another div inside?)
Get rid of the
width:autoand replace it withright:0.jsFiddle example
Since your element is positioned absolutely, you can in effect pull the left and right sides to the edges of the element’s container without invoking the scrollbar.