Ie Bug ?

Discussion in 'HTML & Website Design' started by wizzard, Aug 15, 2006.

  1. #1
    Hi,

    I have something annoying in IE.

    When i put images under eachother like

    <img src=1.jpg border=0>
    <img src=2.jpg border=0>

    Then IE is showing whitespace between both images an firefox not. Does someone knows how i can fix this?

    Cheers
    Kris
     
    wizzard, Aug 15, 2006 IP
  2. Buga

    Buga Guest

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try:
    <p>
    <div><img src="images/blah.jpg" /></div>
    <div><img src="images/blah1.jpg" /></div>
    </p>
    Code (markup):
     
    Buga, Aug 15, 2006 IP
  3. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #3
    you can also try to make sure there are no spaces between <img src=1.jpg border=0> and <img src=2.jpg border=0> like this:

    <img src=1.jpg border=0><img src=2.jpg border=0>
     
    mike323, Aug 15, 2006 IP
  4. blakew

    blakew Active Member

    Messages:
    161
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    You could also put them in table cells with border=0, cell padding=0, cell spacing=0, etc.
     
    blakew, Aug 15, 2006 IP
  5. Buga

    Buga Guest

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Haha, tables :p

    Think they wanted images stacked on top of eachother, not next to eachother...
     
    Buga, Aug 15, 2006 IP
  6. wizzard

    wizzard Peon

    Messages:
    160
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks guys :)

    <div><img src="images/blah.jpg" /></div>
    <div><img src="images/blah1.jpg" /></div>

    This works fine.
     
    wizzard, Aug 16, 2006 IP
  7. Buga

    Buga Guest

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No problem :cool:
     
    Buga, Aug 16, 2006 IP
  8. slickricky

    slickricky Active Member

    Messages:
    240
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #8
    For other people who may be experiencing this problem, it's a good idea to check your doctype. A strict doctype, will cause browsers to display 5 pixels under consecutive images. If you change your doctype to transitional it will go away.

    I looked for quite awhile yesterday to fix this problem, so the more it's posted, maybe it will save some other people some time.
     
    slickricky, Aug 17, 2006 IP
  9. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #9
    In strict, IE actually follows the rules a bit. The fix is to either make img {vertical-align: bottom;} or img {display: block;}. The former if you wish img to remain an inline element, and the latter if you want it to act as a block element.

    cheers,

    gary
     
    kk5st, Aug 18, 2006 IP