SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Turn off CSS in IE6 and lower, except one div

    I want to turn off CSS in IE6 except one div #infobar which tells people to change browser cos ie6 and lower are pure evil. Any ideas? jQuery and Javascript allowed...
    HTML Code:
    <head>
       <title>Rockstyle</title>
     
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
       <link rel="stylesheet" href="files/main.css" type="text/css" />
       <!--[if lt IE 8]>
       <script src="files/infobar.js" type="text/javascript"></script>
       <link rel="stylesheet" href="files/infobar.css" type="text/css" />
       <![endif]-->
       <!--[if IE 7]>   <link rel="stylesheet" href="files/ie7.css" type="text/css" />   <![endif]-->
       <!--[if IE 6]>   <link rel="stylesheet" href="files/ie6.css" type="text/css" />   <![endif]-->
       <script type="text/javascript" src="files/jquery.js"></script>
       <script type="text/javascript" src="files/main.js"></script>
     
    </head>
     
    <body id="article">
    <!--[if lt IE 8]>
    <div id=infobar>
    bla bla bla
    </div><div id=viewplot>
    <![endif]-->

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DO NOT TURN OFF CSS IN IE6.

    Sorry, but instead of giving up and telling users to change browsers (users may have no choice but to use IE6) you should cater for them... It is possible to code a website without hacks which works perfectly in IE6 and all other used browsers! ... It's not an impossible task!!!
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    SitePoint Member
    Join Date
    May 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I guess you are right, but instead i will put fixed block telling all ie6 user what to do. What's right to do. Now i need to visit my psychiatrist.

  4. #4
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rockstyle - You could develop a page just for ie6 users. This is the best bet!
    This way they can view something rather the raw DOM. I know that ie6 sucks and it is a legacy browser but, you have to realize that ie6 users still make up a percentage of the web.


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
  •