Forum Moderators: not2easy
I have a page where I want a header div, 100% width, with a 2px border all around the edge. When I view the page in Mozilla or IE, the right-edge border hangs over the edge of the browser window, creating a horizontal scrollbar. This occurs regardless of how thick the border is. The left border displays fine, but the entire right border - but only the right border - extends past the browser window.
I'm using a strict doctype and the page is rendering in standards mode. Here's the pertinent CSS:
body {
margin: 0px;
}.header {
width: 100%;
background-color: #000080;
border: 1px solid #cee1f0;
font-weight: bold;
font-size: 24px;
color: #ec0606;
}
(And yes I know those colors are odd but this is just for experimental purposes and I wanted things to stand out! :)
The problem described above occurs only when I use a div for the header. When I use a table and apply class="header" to the top cell, everything is fine.
This seems very odd to me; does anyone have any ideas?
Thanks,
Matthew
Thanks,
Matthew