CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 17th, 2003, 04:21 AM
imkarthik imkarthik is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: india
Posts: 34 imkarthik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Send a message via Yahoo to imkarthik
if the browser does not support the css?

i have a css which IE,mozilla
and konquerer browsers supports
but the netscape is not supporting.
If there is any command to neglect
the css only for Netscape navigator.
thanx in advance
__________________
thanx

Reply With Quote
  #2  
Old April 17th, 2003, 05:36 AM
eszet eszet is offline
aka Stef
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 18 eszet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
AFAIK, if the CSS code is not supported by the browser, it will simply be discarded.

Regards,
Stef.

Reply With Quote
  #3  
Old April 17th, 2003, 10:33 AM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 18
There are a couple of ways that you can use different CSS for different browsers.

Create a simple CSS that Netscape will display correctly.
link it by using
Code:
<link href="simple.css" rel="stylesheet" type="text/css" />


You can then import an advanced CSS for use with IE, Moz etc.
Code:
<style type="text/css">
<!--
@import url("advanced.css");
-->
</style>

NS4 does not support @import so will not load the advanced file.



Another way would be to use Javascript Browser Detection to load different CSS.

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<script type="text/javascript">
var isNS4 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") == -1));
var isNS6 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") != -1)); 
var isOpera = navigator.userAgent.indexOf("Opera") != -1; 
var isIE = navigator.userAgent.indexOf("MSIE") != -1 && !isOpera 

if (isNS4) { 
	css = 'simple.css'
	}
else {
	css = 'advanced.css'
	}
document.write('<link href="' + css + '" rel="stylesheet" type="text/css" />');
</script>

</head>

<body>
<h1>Hello </h1>
</body>
</html>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > if the browser does not support the css?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap