Problem: Floated Image works in FF and IE7, but not in IE6

Discussion in 'CSS' started by jazzdrive3, Sep 14, 2007.

  1. #1
    I can't for the life of me figure out what is going on.

    Go to www.newlibertycreation.com and see the 300x250 google ad near the top. It looks fine in FF, but it pushes the text down in IE6.

    I've tried all the usual stuff, adding widths to all the divs, doing display inline, but nothing changes.

    Please help!

    Thanks!
     
    jazzdrive3, Sep 14, 2007 IP
  2. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In your CSS find:
    #content p {margin:0 0 15px;}

    Replace it with:
    #content p {margin:0 0 15px; min-width:100px; width:100px; width:auto;}
     
    hamidof, Sep 15, 2007 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, if you're floating stuff within a div, they need widths too... and old IE sees "width" and thinks, "min-width." So Hamid's code covers you for the IEs.

    I think the only thing you don't need to add the min-width to is when you're floating images... possibly because they're technically an inline element?
     
    Stomme poes, Sep 15, 2007 IP
  4. jazzdrive3

    jazzdrive3 Well-Known Member

    Messages:
    122
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #4
    Worked like a charm. Thanks!
     
    jazzdrive3, Sep 15, 2007 IP