5 replies [Last post]
Maverick07
Offline
newbie
Last seen: 13 years 20 weeks ago
Joined: 2007-06-03
Posts: 3
Points: 0

I can't seem to get rid of this strange space that occurs between my content div and footer div in firefox. The layout displays perfectly in IE7, but this space in firefox has been driving me crazy! Any help is really appreciated. Here's the code:

Death By Spoon

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris vel magna. Mauris risus nunc, tristique varius, gravida in, lacinia vel, elit. Nam ornare, felis non faucibus molestie, nulla augue adipiscing mauris, a nonummy diam ligula ut risus. Praesent varius. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Phasellus id nisi in massa tincidunt placerat. Cras sem libero, vestibulum nec, luctus nec, fermentum nec, urna. Mauris accumsan feugiat odio. Etiam porttitor auctor eros. Duis accumsan, ante sit amet lacinia hendrerit, diam est pharetra dui, et condimentum odio libero quis risus. Maecenas vitae odio sit amet sem ullamcorper pulvinar. Vivamus eu diam quis dolor fermentum vestibulum. Etiam blandit urna vel tellus elementum tincidunt. Aliquam ullamcorper semper velit. Ut molestie. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Etiam ac orci. Nunc pulvinar tempor velit. Aenean et justo. Nullam eu diam id orci faucibus bibendum. Suspendisse potenti.

Vivamus leo velit, interdum ac, commodo quis, porta et, dui. Nam mi sapien, mollis quis, blandit vitae, tincidunt et, purus. Sed ornare volutpat lectus. Donec et sapien. Suspendisse potenti. Nulla facilisi. Proin risus. Morbi dui leo, gravida at, eleifend ut, rhoncus et, pede. Nulla mi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin est metus, tristique sit amet, elementum non, nonummy id, erat. Pellentesque magna elit, mollis ut, eleifend id, nonummy sit amet, augue. Cras imperdiet, orci scelerisque tempus vulputate, justo elit euismod nibh, et eleifend massa ipsum id massa. Sed lacinia massa. Nunc tempor pretium odio. Fusce est neque, tempus non, auctor in, mattis nec, tellus. Nullam ultricies.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 20 hours 28 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9772
Points: 3854

That's due to margin collapse

That's due to margin collapse. Firefox and other modern browsers do it correctly; IE, not so well. See Meyer, Uncollapsing Margins.

Give #footer p {margin: 0;}, or #footer {padding: 1px 0;}.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Maverick07
Offline
newbie
Last seen: 13 years 20 weeks ago
Joined: 2007-06-03
Posts: 3
Points: 0

I tried all the ways to

I tried all the ways to uncollapse margins, the space is still occuring.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 41 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

text-align: left; /* this

:?

text-align: left; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */

Does it!

try what Gary suggested but on the last 'p' in maincontent.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 20 hours 28 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9772
Points: 3854

Two sources of margins to

Smile Two sources of margins to collapse. Shoulda looked more carefully.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Maverick07
Offline
newbie
Last seen: 13 years 20 weeks ago
Joined: 2007-06-03
Posts: 3
Points: 0

IT WORKED! Thanks so much

IT WORKED! Thanks so much guys...