Forum Moderators: not2easy

Message Too Old, No Replies

Gap between elements is different in IE from other browsers

IE seems to have an unexplained margin.

         

erdy

10:07 pm on Jun 26, 2007 (gmt 0)

10+ Year Member



Hi,

I have a div floated left and one next to it floated right.
Both of these are 400px wide in a container div that is 800px.
They both have background images in them and no content.
The left one is 200px high and the right one is 280px high.
Directly underneath the left div is another div floated left that is 80px high so that all three make a perfect rectangle.
The 80px high left div has a list of links that are also floated left to create a horizontal row of links.
bizzarely in IE there seems to be an unaccountable amount of margin between this 80px high div and a H1 div that sits directly below. Every other browser has the H1 div butted up to the 80px high div but IE seems to give some sort of unexplainable margin.
I have cured it by giving the H1 element a display value of inline, but can anyone explain why this is happening please?

Thanks in advance.

erdy.

Marshall

12:12 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can assign a height or line-height to the <h1> to force the space to be uniform.

Marshall

[edited by: Marshall at 12:13 am (utc) on June 27, 2007]