General discussion

  • Creator
  • #2285039

    Fixing float margins in IE


    by maryweilage ·

    This week’s Design and Usability Tactics newsletter describes two ways to fix float margins in IE. One involves a simple CSS hack. The second solution is hack-free, but it requires rethinking the approach to specifying the spacing between the boxes.

    How do you deal with browser problems such as IE’s doubled margins on floats? Do you have a favorite alternative to a commonly used CSS hack? Or, do you think it’s not worth the trouble to search for a hack-free alternative when there’s a documented hack available that addresses the problem?

All Comments

  • Author
    • #3293085

      I’d rather use the hack

      by dlwaters ·

      In reply to Fixing float margins in IE

      In this case, I’d rather use the hack, than the CSS fix, because the CSS fix of padding the left side limits the placement of further content to being 100px from the left edge, unless you apply negative margins to other contained elements. I have found, in general, that padding an enclosing box can often cause design problems down the line. I frequently use background colors applied to my

      tags when I want a heading to act as a divider that spans the entire width of a container box, so padding at the container level throws this off.

      I believe I have accidentally come across the “inline” hack while trying to fix IE problems before (having no clue why it worked!) It is nice to have confirmation of this technique, even if it is a hack. Thanks!

      Dean L Waters

Viewing 0 reply threads