I think you should fiddle with your DOCTYPE as this usually gets IE going in the right direction
Could it be that IE8 is not including the height of the border as part of its height parameter? Try adding the size of the border as well.
Ok,I have no solution for now, but I just display the bottom div border top instead of its border bottom and it looks good enought for now. If any one knows better, he's still welcome.
I would assume this issue has something to do with margins and padding. Do you have any information or spacers inside of your DIVs? This could result in extra space that you did not account for.
I would adjust the divs with margin:0; border-collapse:collapse;
Also, as you had mentioned, on your bottom DIV you should have that set to its top border to try and prevent such gaps from occurring due to any margins or spacing within the DIV itself.
Check the "actual" height of the BOTTOM "border" div with IE8's Developer toolbar. Make sure it is "0".
Try the following for that bottom div.
<style type="text/css">
#bottomBorder{
/* Adding '!important' to each CSS rule
will make sure nothing else in your code is 'overwriting'
that rule. (doesn't work for IE6)
*/
line-height:0 !important;
font-size:0 !important;
height:0 !important;
border-bottom:solid 4px red;
position:absolute;
}
</style>
OR try:
<style type="text/css">
#bottomBorder{
border-top:solid 4px red;
}
</style>
What I'm thinking is that IE won't let you set a div to 0px height. I've seen this on divs before.