Click to See Complete Forum and Search --> : Problem with floats


hitman
07-18-2006, 02:53 PM
My page doesn't show normally in Firefox. It's fine in IE6 though. I've been told it's because of the floats, but don't know how to solve that.

Could you please help me out please?

Here's how the page shows:

In Internet Explorer (http://img1.imagetitan.com/img1/1/22/untitled-4.jpg)
In Firefox (http://img1.imagetitan.com/img1/1/22/untitled-2910.jpg)

The code is attached.

nataliemac
07-18-2006, 05:02 PM
Just glancing at your pictures, it looks like you need to clear your floats. After you close your floating divs and before you close your container div, enter:

<div style="clear:both"></div>

Or, you can add a style to your stylesheet with clear set to both and just use that style anytime you need to clear the floats. I usually call my class "clearboth".

hitman
07-19-2006, 08:48 AM
nice. that did the job. Thank you!

But what about the ul? Why is it leaving so much space on the left in Firefox?

Pixel-Artist
07-20-2006, 04:19 AM
ul {
margin: 0;
padding 0;
}