posts - 380, comments - 634, trackbacks - 117,
Dan Bartels online engineering logbook... Items that I find useful organized for my use, and indexed by google for yours. Here you can find information about Microsoft C# programming, SQL SERVER 2005, Telligent Systems CommunityServer, Dot Net Nuke, Windows Vista / Longhorn, and just about anything else that would compel me to type.

News

What I am Reading:


Professional Community Server

Past books can be viewed on:

Post Categories

Archives

Coding Techniques

Coding Tools

Community Sites

Deal Finders

Friends Businesses

Microsofties

Smartphones

Utilities

my blogmap
CSS IE vs Firefox Float Bug

There is a bug in IE that causes it to double the margin settings for floated div blocks…  to fix it you just put display:inline in your style tag for float div… 

Also, if your float div content is larger (longer) than your content div you need to wrap both the content and the float div in another float div, which will force it to expand down all of the way…   Then if you want content to appear below the new floaters your going to need to clear:both to stop the floating chaos that will ensue…

http://www.webmasterworld.com/forum83/4161.htm

Dan

Published Monday, March 14, 2005 9:08 PM by DanB

Filed under ,
::

Comments

# re: CSS IE vs Firefox Float Bug @ Tuesday, March 15, 2005 12:46 PM

I am glad to see you got that fixed. I use Firefox and it was all over the place the other day and it looks great now.

Brennan Stehling

# re: CSS IE vs Firefox Float Bug @ Monday, June 05, 2006 11:36 PM

Thanks a lot, putting all my floating div's inside a parent div with float:left fixed the problem..  How did your brain get so big?

Mark Brown

# re: CSS IE vs Firefox Float Bug @ Wednesday, March 21, 2007 3:52 PM

OMG!!  I have been searching high and low to solve this.  Actually found some solutions that just didn;t seem to work (or didn't sink in).

Saw your post...stuck a float: left in the parent div....BAM!

Thank you!!

Dan Walter

# re: CSS IE vs Firefox Float Bug @ Wednesday, January 16, 2008 9:55 AM

Shoop da Whoop Thank you!!!!

You resolved my last 2 hours of work - and my headache!

Stefano Mariani

# re: CSS IE vs Firefox Float Bug @ Tuesday, June 24, 2008 2:13 AM

Thanks Mark. (me too)

I'd been going nowhere fast with Firefox displaying my floats incorrectly within nested divs.

I'd been googling everywhere without finding a solution that worked.  I don't know why but changing the parent div from relative to float:left fixed it.

No idea why. But yay!

Dave

# re: CSS IE vs Firefox Float Bug @ Friday, September 26, 2008 11:33 AM

Thanks for your fix. I got mad when I first discovered this problem in "world's #1" browser. Jos

Jos van der Burgt

# re: CSS IE vs Firefox Float Bug @ Tuesday, March 24, 2009 8:48 PM

Wow, thankyou Dave!!

That was a really annoying firefox bug.

I had a set of floating div's in a div with negative margin-top, and they were all going haywire!! That was, until I put float:left on the parent div. Miraculously, the float:left on the parent div didn't have any visual impact in any of the browsers, but it fixed the FF bug and now all the nested floating div's are displaying correctly.

One thing I might point out is that the problem I was getting would only show for the first load of firefox - if I hit refresh on the page the problem was not there. To get the bug to show, each time I made a change to my CSS, i had to reload FF completely to test it!

So, I really can't say thanks enough for that idea.

Adrian

Leave a Comment

(required) 
(required) 
(optional)
(required) 
 
Powered by Community Server (Commercial Edition), by Telligent Systems
powered by god (with a little help from Telligent Systems - Community Server 2.1)