2 replies [Last post]
Da Devil
Offline
Regular
The Netherlands
Last seen: 17 years 50 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-10-17
Posts: 11
Points: 0

(This problem is in firefox, not in IE, and i don't know for other browsers)

I have my site always ready (just a simple one for school), one of the last things i wanted to do was making a shadow behind it. That wasn't very hard, but when i used float: left i noticed that the bottom-margin is no longer working. (when i remove that float: left it's normal, but the right-shadow doesn't work.)
So, Does anyone know how I can fix this?

(btw, example: with shadow / float & w/o shadow / float

~Thanks.

chris_sw
Offline
Enthusiast
Leeds, UK
Last seen: 18 years 1 week ago
Leeds, UK
Joined: 2004-09-21
Posts: 115
Points: 0

[FireFox] Body bottom margin doesn't work with a float

Hi

As the shadowcontainer is floated, it is removed from the normal flow so the body's 20px bottom margin will be 20px from the top of the page

You'll need to either place a clearing element after your content, or use Tony's clearing class: http://www.csscreator.com/attributes/containedfloat.php

Da Devil
Offline
Regular
The Netherlands
Last seen: 17 years 50 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-10-17
Posts: 11
Points: 0

[FireFox] Body bottom margin doesn't work with a float

Hmm... Can you give me an example? Smile

Ah never mind, there was an example in the link you gave me Smile Thanks.