Browser Conditionals Help

Discussion in 'HTML & Website Design' started by BannanoPeel, Apr 23, 2010.

  1. #1
    Well once again Internet Explorer has me in tears, I have been trying for hours to get my layout right, but IE keeps on making my <br /> to large. Anyways I'm not too well knowledge in these conditionals so if you can help me that would be great.

    Here is what I need to do:

    <if Internet Explorer>
    <br />
    <else>
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    </if>

    I'm not even sure if you can do else statements for this, but if you can please help me.

    Thanks,
    Ty
     
    BannanoPeel, Apr 23, 2010 IP
  2. Paweł

    Paweł Active Member

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    You should avoid using BRs as a separation element because it's not the normal usage of this tag. Instead of tons of BRs, use a CSS margins or paddings to make a distance You need. According to IE conditional statements, here's the example:
    <!--[if IE]>
    <p>I will display only when You're using IE.</p>
    <![endif]-->
    Code (markup):
     
    Paweł, Apr 23, 2010 IP
  3. BannanoPeel

    BannanoPeel Member

    Messages:
    94
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    I agree I really don't like using the breaks either, but I've tried using padding and margins but for some reason it's not working.

    Your code is good, but I need something that excludes everything but IE, so I don't have to do FF, Chrome, Safari etc.
     
    BannanoPeel, Apr 23, 2010 IP
  4. Paweł

    Paweł Active Member

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #4
    Hmm, maybe negative margins inside IE statements? I haven't been doing that because it's not my way of coding. There'are no conditional statements for FF, Chrome or Safari (it can be achieved only using JS or PHP, which is very ineffective method imo).
     
    Paweł, Apr 23, 2010 IP