Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Hide From IE

  1. #1
    New Coder
    Join Date
    Aug 2008
    Posts
    60
    Thanks
    6
    Thanked 6 Times in 6 Posts

    Question Hide From IE

    I have the following code....
    Code:
    <div class="scroll">
    <A href="mailto:****@aim.com?subject='Hi'">E-mail Me</A>
    <br><a href="aim:goIM:" screenname='****'>AIM Message Me</a>
    <br><a href="http://www.myspace.com">Myspace</a>
    <br><a href="http://www.myspace.com/****">My Myspace</a>
    </div>
    <style>
    .scroll{
    width: 200px;
    height: 50px;
    overflow: auto;
    padding: 4px;
    border: grey 2px solid;
    }
    </style>
    Is there any way i can hide it from all versions of Internet Explorer?

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,335
    Thanks
    11
    Thanked 588 Times in 569 Posts
    Code:
    <![if !IE]>
    <div class="scroll">
    <A href="mailto:****@aim.com?subject='Hi'">E-mail Me</A>
    <br><a href="aim:goIM:" screenname='****'>AIM Message Me</a>
    <br><a href="http://www.myspace.com">Myspace</a>
    <br><a href="http://www.myspace.com/****">My Myspace</a>
    </div>
    <style>
    .scroll{
    width: 200px;
    height: 50px;
    overflow: auto;
    padding: 4px;
    border: grey 2px solid;
    }
    </style>
    <![endif]>
    this works just fine, but does prevent validation, if that matters to you (doesn't look like it does).
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • Users who have thanked rnd me for this post:

    uncrocks (08-13-2008)

  • #3
    New Coder
    Join Date
    Aug 2008
    Posts
    60
    Thanks
    6
    Thanked 6 Times in 6 Posts

    Lightbulb

    Internet Explorer is 'IE'...
    What is Firefox????
    By the Way Thanks for the First Reply

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    See http://www.cssplay.co.uk/menu/conditional.html
    <!--[if !IE]><!-->
    <h1>You are NOT using Internet Explorer</h1>
    <!--<![endif]-->
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,335
    Thanks
    11
    Thanked 588 Times in 569 Posts
    its more complicated to screen for a particular non-ie browser.

    one way would be to turn the html into a valid string, and check navigator.userAgent to determine the browser, and if a match is made, document.write the html string to show the code in that browser.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #6
    New Coder
    Join Date
    Aug 2008
    Posts
    60
    Thanks
    6
    Thanked 6 Times in 6 Posts
    So Something Like This?
    Code:
    
    if (navigator.userAgent="Firefox") {
    document.write(stringwhatever);
    }


  •  

    Posting Permissions

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