Forum Moderators: not2easy
ok, here's my page:
/-----------------------------------\
¦..............HEADER...............¦
\___________________________________/
. . . . . . . . . . . . . . . . . . .
/-----------------------------------\
¦..............NAVBAR...............¦
\___________________________________/
. . . . . . . . . . . . . . . . . . .
/------\ /--------------------------\
¦......¦ ¦.......MINI HEADER........¦
¦......¦ \__________________________/
¦......¦. . . . . . . . . . . . . . .
¦......¦ /----------------\ /-------\
¦.LEFT.¦ ¦................¦ ¦.......¦
¦......¦ ¦................¦ ¦.......¦
¦......¦ ¦................¦ ¦.......¦
¦......¦ ¦....CONTENT.....¦ ¦.......¦
¦......¦ ¦................¦ ¦.......¦
\______/ ¦................¦ ¦.......¦
. . . . .¦................¦ ¦.RIGHT.¦
. . . . .\----------------/ ¦.......¦
. . . . . . . . . . . . . . ¦.......¦
. . . . . . . . . . . . . . ¦.......¦
. . . . . . . . . . . . . . ¦.......¦
. . . . . . . . . . . . . . ¦.......¦
. . . . . . . . . . . . . . ¦.......¦
. . . . . . . . . . . . . . \_______/
. . . . . . . . . . . . . . . . . . .
. . . . ./--------------------------\
. . . . .¦..........BOTTOM..........¦
. . . . .\__________________________/
. . . . . . . . . . . . . . . . . . .
And here's the code......
<div id='header'>Stuff</div>
<div id='navbar'>Stuff</div><div id='columns'>
...<div id='left'>Stuff</div>
...<div id='miniheader'>Stuff</div>
...<div id='right'>Stuff</div>
...<div id='content'>Stuff</div>
...<div id='bottom'>Stuff</div>
</div>#columns {
position: relative;
overflow: auto;
width: 100%;
}#left {
float: left;
width: 160px;
}#right {
float: right;
width: 290px;
}#content {
margin-left: 170px;
margin-right: 300px;
}#miniheader {
height: 50px;
}#bottom {
margin-left: 170px;
margin-top: 20px;
}
The header, navbar, and mini header are not a problem, and the layout works fine, just 1 little issue.....
Now, the problem I'm having is with the #bottom, as you can see I want a 20px gap above it. There is no way to know whether the #content, or #right will be the tallest div, depends on the page.
In IE this works fine, in FF if the #right is longer, the gap disappears. I'm guessing that's cos it's floated and FF is correct.
So, I put a bottom margin on #content, and #right, so whichever was longer would push #bottom downwards. Works in FF, but IE, somehow, applies the #content margin as well, even if the column is much shorter. I verified this by removing the margin from #right.
I know I could fix this by moving #bottom out of #columns, but there are a lot of pages to change if I go down that road!
Is there a way to make IE behave, or find a happy compromise?
[w3.org...]
I assume margin's don't take into account floated boxed, which would make FF's interpretation correct, but by floating #bottom it does take other floats into account.
I would like someone to confirm if this is correct or not, and if not explain the behaviour. What's weird in IE is that if a bottom margin of 20px is set on #content and #right (without top margin on #bottom), the gap is always 40px in IE.