Handling float margins in IE.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • drdeadpan

    Handling float margins in IE.

    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:


    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:


    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

    #2
    Re: Handling float margins in IE.


    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..:


    DrD

    Comment

    Working...