CSS Code for If This Browser Do That

Discussion in 'CSS' started by jj1, Mar 2, 2011.

  1. #1
    I'm having problems with images aligning differently in different browsers. I've asked for help in a different thread, but if I can't sort it out is there any css code to say:

    If internet explorer (all of them) use top:10px;
    If Firefox or chrome (or other browser) use top:0px;
     
    jj1, Mar 2, 2011 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    For IE there is because there is no need to do that for modern browsers. IE is not a modern browser. Google for "conditional comments".
     
    drhowarddrfine, Mar 2, 2011 IP
  3. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Also make sure to reset to zero all margin, padding of html elements.
     
    radiant_luv, Mar 2, 2011 IP
  4. Divisive Cottonwood

    Divisive Cottonwood Peon

    Messages:
    1,674
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Divisive Cottonwood, Mar 3, 2011 IP
  5. sguduru

    sguduru Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    sguduru, Mar 16, 2011 IP