IE showing images vertically rather than horizontal, Webkit and FF show horizontal

Discussion in 'HTML & Website Design' started by guod, Oct 19, 2010.

  1. #1
    I am trying to edit my image viewer on my site, but for some reason it works perfectly in chrome, safari and Firefox, but IE is giving me one issue. The images are being stacked vertically (one on to of the other) rather than show up all in one row horizontally. This is making my page longer in IE and just does not look the way I want it to..Any ideas at to what could cause this? Website is declared with this :

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    HTML:

     
    guod, Oct 19, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    That is expected and the norm but without a link, or the complete markup, anything is just a wild guess.
     
    drhowarddrfine, Oct 19, 2010 IP
  3. guod

    guod Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here is a link


    http://www.jewelryboxavenue.com/Oceana-Blue-Jewelry-Box_p_58.html
     
    guod, Oct 19, 2010 IP
  4. guod

    guod Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    bump.

    does anyone know where to start looking as to where the problem is?
     
    guod, Oct 21, 2010 IP
  5. CCD

    CCD Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I think using the 'loose' DTD, IE will use quirks mode, which means 'box model' problems...

    Firefox, Safari, Chrome, Opera, etc any webstandards browser will take the width of an element and and add on any padding or margin, whereas IE will use the width as the maximum, subtracting any padding or margin and thus shrinking the space available for content.

    The easiest way to fix this is to use conditional comments in your head section that target IE only and feed it a different style sheet (the width of the element plus any margin and padding) like so:

    
    <!--[if lt IE 9]>
        <link rel="stylesheet" href="ie-only-styles.css" type="text/css">
    <![endif]-->
    
    Code (markup):
    If you use the 'strict' doctype instead of 'loose', you'll only have to worry about IE7 and below not rendering the box model correctly, if I remember right?
     
    CCD, Oct 21, 2010 IP
  6. guod

    guod Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    well here is my problem, I understand all of that, but I do not know what html to even adjust or css to adjust if I were to do conditional. I do have one conditional stylesheet now, but do not know what to adjust if I have to add on to it.
     
    guod, Oct 22, 2010 IP
  7. CCD

    CCD Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Which part of the page isn't working in IE? sorry I can't see for myself, I am on my old mac laptop with no windows os.

    If it's the 'related items' panel towards the bottom of the page, find the css rule for those in your main style sheet, make a note of the width and padding. For the IE style sheet, make the width of each panel the width plus the padding eg. total width looks like 130px and padding 10px, so maybe your rule says width:110px? for IE make it width:130px (element width plus padding).
     
    CCD, Oct 22, 2010 IP
  8. guod

    guod Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    problem solved! another forum member found out i was missing a TD inside a TR.

    thanks guys
     
    guod, Oct 22, 2010 IP
  9. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #9
    No. A missing doctype will put it into quirks.
     
    drhowarddrfine, Oct 22, 2010 IP