6 replies [Last post]
CrazyHarry
Offline
newbie
Last seen: 15 years 8 weeks ago
Joined: 2006-12-04
Posts: 2
Points: 0

Hi,

For the life of me, I can't figure out why there's a white gap above the black block of text in this page in Firefox (2.Innocent but not in IE (6.Innocent. (The gap is unwanted, by the way.)

Here's the code:


Problem Page



Problem Page

About the Problem

I've tried this page in IE 6.0 and Firefox 2.0, and while IE 6
displays the page without a gap at the top, Firefox 2 doesn't.

And here's the page itself.

Any help would be appreciated.

Triumph (not verified)
Anonymous's picture
Guru

h1 {margin-top:0;} It

h1 {margin-top:0;}

Smile It is the built in margins of the header tags

if you want to zero all margins and padding use the universal selector like this: *{ margin:0; padding:0 }

mod edit/<code> tags fixed/tph

drhowarddrfine
Offline
Leader
Last seen: 12 years 8 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

As usual, IE is screwing up.

As usual, IE is screwing up. It is ignoring the margin for h1 while Firefox is correctly inserting it. Just add *{margin:} or h1{margin:0}.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

Triumph (not verified)
Anonymous's picture
Guru

Jinx!

Jinx!

CrazyHarry
Offline
newbie
Last seen: 15 years 8 weeks ago
Joined: 2006-12-04
Posts: 2
Points: 0

Thanks for that! Just out

Thanks for that!

Just out of curiosity, why is the h1 top margin extended above the top of the black div block rather than within it?

Triumph (not verified)
Anonymous's picture
Guru

CrazyHarry wrote:Just out of

CrazyHarry wrote:
Just out of curiosity, why is the h1 top margin extended above the top of the black div block rather than within it?

Margin is outside of the box while padding is inside the box.

drhowarddrfine
Offline
Leader
Last seen: 12 years 8 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

Quote:Jinx!Hey, I was here

Quote:
Jinx!
Hey, I was here first!

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott