|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
browser dependant css file possible?
At the moment I have a browser detect on my page that will redirect ns users to a ns specific page.
What I would like to do for my next project is merely redirect them to a different style sheet. Is this possible? Please help!! ![]() |
|
#2
|
||||
|
||||
|
One way is to just do your browser detect then document.write the links to external CSS files within a switch control.
|
|
#3
|
|||
|
|||
|
another way would be "javascript style sheets" which is a netscape-4-only-way for redefining css styles.
you use standard-css for all browsers, but for netscape you set the styles in the onload-handler of the body using javascript. look at http://devedge.netscape.com for further reference.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#4
|
|||
|
|||
|
<script type="text/javascript" language="JavaScript1.2">
if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) document.write('<link rel="stylesheet" type="text/css" href="ns4_style.css">'); else document.write('<link rel="stylesheet" type="text/css" href="default_style.css">'); </script> In the <head>er; file names (blue), up to you... |
|
#5
|
|||
|
|||
|
|
|
#6
|
|||
|
|||
|
what is "backwards" about this?
|
|
#7
|
||||
|
||||
|
Quote:
Quote:
You've got JSSS 'redefining' CSS - it's the other way around. ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > browser dependant css file possible? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|