Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Safari redirect to alternate CSS

Safari redirect to alternate CSS
Thread Tools
Dedicated MacNNer
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 18, 2003, 09:03 AM
 
How can I redirect Safari users to an alternate CSS using Javascript on websites?

ie (no pun intended) I want all other browser users to use the main CSS and Safari users to use safari.css

All ideas gratefully recieved!

Cheers!
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 18, 2003, 09:55 AM
 
Dave Hyatt's Weblog had something on this on January 15. There's a Safari-specific JavaScript function you can use to change the selected stylesheet. Use this in your onLoad event, and that should suffice.

http://www.mozillazine.org/weblogs/hyatt/
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
m.brown  (op)
Dedicated MacNNer
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 21, 2003, 11:47 AM
 
------
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 23, 2003, 02:29 AM
 
Originally posted by m.brown:
------
What kind of an answer is that? Did it help you or not?

By the way, it's just rude to have your websites load differently depending on which browser they have. Not only is it easily faked, but you punishing/rewarding people for certain browsers. I dislike the idea.
     
Mac Enthusiast
Join Date: Jan 2001
Location: East of Belfast Furry Animal Sanctuary
Status: Offline
Reply With Quote
Jan 23, 2003, 07:58 AM
 
Originally posted by Xeo:
What kind of an answer is that? Did it help you or not?

By the way, it's just rude to have your websites load differently depending on which browser they have. Not only is it easily faked, but you punishing/rewarding people for certain browsers. I dislike the idea.
damn right!

Which I know ain't much of a response but since this morning i've been trying to designa site to work seamlessly across as many browsers as i can with one stylesheet and a few graphic workarounds, it seems daft to over compliacte the issue. I thought we were designing for people not browsers (raise your handbags now and shout ooooooooooooh!)
Torn apart by the wood peckers of mistrust t0 not have this happen 2 u visit guinea pig::the life of a mac designer::
     
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status: Offline
Reply With Quote
Jan 24, 2003, 02:37 PM
 
I'll have to defend browser spesific stylesheets just a bit - NS4 has caused me all kinds of probs, which I have gladly taken care of with an alternate CSS file.

The other options would be to indeed design on NS4's terms, or even worse, to ignore its users.

J
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:03 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2