Results 1 to 2 of 2

Thread: Firefox Spacing Problem

  1. #1
    Join Date
    Dec 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Firefox Spacing Problem

    Is there a way to insert a <p> or </br> but only for IE, especially IE 7.0. I don't want FF to read it.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Sure, use conditional comments:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
        </head>
        <body>
            <p>
                Everyone can see this
            </p>
            <!--[if IE 7]>
                <p>
                Only IE7 users can see this
                <br>
                That's right
                </p>
            <![endif]-->
        </body>
    </html>
    These are especially useful when you need different styles for IE, you can then put a link to a stylesheet between the conditional comments. Take a look at this article for more info:
    http://msdn.microsoft.com/en-us/library/ms537512.aspx

    Good luck!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •