Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Turn off CSS in IE6 and lower, except one div
Old 07-29-2008, 07:16 AM Turn off CSS in IE6 and lower, except one div
Junior Talker

Posts: 3
Trades: 0
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:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl"> 
 
<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]--> 
   <link rel="shortcut icon" href="/files/favicon.ico" type="image/x-icon" />    
 
   <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><a href=http://browsehappy.pl/infobar> 
Internet Explorer nie potrafi poprawnie wyświetlić tej strony. Kliknij tutaj, aby dowiedzieć się więcej... 
</a></div><div id=viewplot> 
<![endif]--> 
rockstyle is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-29-2008, 10:35 AM Re: Turn off CSS in IE6 and lower, except one div
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
good plan!

Isolate somewhere between 30% and 60% of your visitors.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-03-2008, 05:59 PM Re: Turn off CSS in IE6 and lower, except one div
Novice Talker

Posts: 7
Name: Damien Roche
Trades: 0
I like it...bad idea though.

just use a conditional in your HTML.
Code:
<!--[if lte IE 6]>

ENTER YOUR BROWSER SPECIFIC CODE HERE

<![endif]-->
lte means less than or equal to..sometimes it doesn't work. I find it easier to just use specifics (if IE 6). You can also use:
lt = less than
gt = greater than
gte = greater than or equal to

hope that helps.
DamienRoche is offline
Reply With Quote
View Public Profile
 
Old 08-03-2008, 06:05 PM Re: Turn off CSS in IE6 and lower, except one div
Novice Talker

Posts: 7
Name: Damien Roche
Trades: 0
Just noticed you've already tried that...I'll read your post first next time.

What you could do is make stuff not display by using this in your code:
Code:
#elementdiv{
display:none;
}
then just have one element showing...that being your #infobar ..
?

really, though, this is a stupid idea. What would be better is to feature a little infobar someone on screen that alerts your visitors if they're using a certain ie browser, without actually disabling the functioning or displaying of your site.

regards.
DamienRoche is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Turn off CSS in IE6 and lower, except one div
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.68962 seconds with 12 queries