Body Margin:0, Div Width:100% problem in FF and Chrome, fine in IE
- by Albert
Hey People,
I'm starting to pull my hair out of my head...
I have the following:
<html>
<head>
<style>
body { margin:0 auto; }
</style>
</head>
<body>
<div style="border: solid 1px red; width: 100%;">test</div>
</body>
</html>
This works in IE producing a nice div, 100% width, no H scrollbar...
Now in Chrome and FF, it is 1px wider than the window, causing an H scrollbar...
Why is that? What SHOULD I be using instead?
Thanks a lot!
Albert