Conditional in-line style

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I need to change a style in my CSS style sheet if the browser is Netscape. I
assume the best way to do this would be to add a conditional statement in
the head of the page. Please can someone tell me the html code to change
style sheet style from .class to .class_n if the browser is Netscape?

Many thanks in advance.
 
Just add a conditional statement to pick up IE rather than the other way
around, e.g.,

<head>
....
<style type="text/css">
<!--
Your netscape styles here
-->
</style>
<!--[if gte IE 5]>
<style>
your IE styles here
</style>
<![endif]-->
</head>
 
what actually detects the browser type anyway?


| I need to change a style in my CSS style sheet if the browser is Netscape. I
| assume the best way to do this would be to add a conditional statement in
| the head of the page. Please can someone tell me the html code to change
| style sheet style from .class to .class_n if the browser is Netscape?
|
| Many thanks in advance.
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top