S
(Shovel)
Guest
Right, I'm trying to get a nice CSS Layout set up, where we have a logo in the top left (this is fine), then a bodytext <div> on the right hand side, with a menu level with the bodytext on the left. .. to a degree very much like an old table column layout would do.
Due to Microsoft not supporting "position: fixed", I'm doing this with absolutely position boxes, and I'm having some browser compatibility related "fun" getting it to line up. Here's the style sheet:
Using the HTML-Kit preview (which renders in IE) the top first
aragraph of the menu lines up with the top of the body division. However, Mozilla has a small gap between the top of the box and the top of the paragraph. It means the borders of the first menu don't align with the top of the border of the body.
Erm... stuck!
The other thing I note, is that while Mozilla will be very well behaved and render the entire body region if I tell it to, IE will only render the area filled by text
Also tested it in Opera, and the borders do line up.
I can guess that it's a problem that Mozilla puts a gap before a paragraph that IE/Opera doesn't. I've played with valign and margin and padding and none of them can persuade it to line up. Is there an answer?
Thanks very much
Due to Microsoft not supporting "position: fixed", I'm doing this with absolutely position boxes, and I'm having some browser compatibility related "fun" getting it to line up. Here's the style sheet:
Code:
#menu {
position: absolute;
top: 250px;
left: 5px;
right: 20%;
width: 20%;
height: auto;
color: #FFF;
padding: 0px;
margin: 0px;
}
#menu p:first-line {
font-weight: 700;
}
#menu p {
clear: both;
background-color: #06C;
background-image: url("../img/arrow.gif");
background-repeat: no-repeat;
border: 3px solid #FFF;
padding-left: 30px;
}
#body {
position: absolute;
top:250px;
left: 25%;
right: 5px;
bottom: 50px;
height: auto;
width: 70%;
background-color: #06c;
border:3px solid #FFF;
color: #FFF;
}
Using the HTML-Kit preview (which renders in IE) the top first
aragraph of the menu lines up with the top of the body division. However, Mozilla has a small gap between the top of the box and the top of the paragraph. It means the borders of the first menu don't align with the top of the border of the body.
Erm... stuck!
The other thing I note, is that while Mozilla will be very well behaved and render the entire body region if I tell it to, IE will only render the area filled by text
Also tested it in Opera, and the borders do line up.
I can guess that it's a problem that Mozilla puts a gap before a paragraph that IE/Opera doesn't. I've played with valign and margin and padding and none of them can persuade it to line up. Is there an answer?
Thanks very much