471,598 Members | 1,298 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 software developers and data experts.

Firefox Float problem

I can't seem to get float to work at all in Firefox, but it works just fine in IE7. I'm using FireFox 2.0.0.6. This seems so basic I can't believe it is a bug, but I just can't understand why it doesn't work for me.

you can check it out here:

http://www.vineyardspecialties.com/newIndex5.html
http://www.vineyardspecialties.com/style5.css

Thanks
Sep 7 '07 #1
2 2370
I seem to have discovered the issue:

This worked fine:
<div id="one">text</div>
<div id="two">text</div>
#one
{
float: left;
}


#two
{
clear: left;
}

but I needed this:

#one
{
float: left;
}


#two
{
float: left;
}


which wasn't working
until I added this:


#one
{
float: left;
width: 30px;
}


#two
{
float: left;
width: 30px;
}

Seems it Firefox needs widths and IE 7 doesn't. Mystery solved!
Sep 8 '07 #2
drhowarddrfine
7,435 Expert 4TB
It's no mystery, the bug, as usual, is with IE. If there is no width, the div should collapse to nothing. IE doesn't follow the rules. After all, IE7 is nine years behind web standards.

Never, ever use IE as a reference for how things should work. Always, always use a modern browser, such as Firefox, Opera or Safari.
Sep 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

18 posts views Thread by Niels | last post: by
10 posts views Thread by Jesper Rønn-Jensen | last post: by
reply views Thread by smokeyd | last post: by
1 post views Thread by books1999 | last post: by
3 posts views Thread by ffrugone | last post: by
3 posts views Thread by Steve | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.