This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > January 2005 > Handling float margins in IE.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Handling float margins in IE.
drdeadpan

2005-01-29, 7:19 pm

Hi,

I've been reading about IE having issues rendering the correct
margins in FLoated elements. Basically, my code renders fine in FF but
not in IE.

Look at this link in FF and IE to see what I mean:
http://home.cachecow.org:7777/home.html

One fix that has been widely published on the web is to wrap the
floated element in its own div and then apply the float to the wrapper
div. That seems to work in IE but apparently messes FF in the way it
renders. The page with this fix can be viewed here:
http://home.cachecow.org:7777/home1.html

I've tried a few other things with limited success but the fix I made
above apparently should work. Any idea what I'm doing wrong..?

DrD

drdeadpan

2005-01-30, 4:15 am


Hmmm...I think it has something to do with the width of the float. I
have a width of the floated element set to 20% and the right margin of
the body tag also set to 20%. I changed the right margin of the body
tag to 10% and now evrything looks fine in both IE and Firefox i.e. I
used the same code in home.html and just changed the body margins from
10% 20% 10% 20% to 5% 10% 10% 10%. Is this another IE width issue ?
Here's the link..:
http://home.cachecow.org:7777/home2.html

DrD

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews