Forum Moderators: open

Message Too Old, No Replies

detect browser to choose stylesheet

I just don't have the time to implement the box model hack

         

illtron

6:26 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



Can anybody give me, or point me in the direction of information on displaying a certain stylesheet based on a user's browser?

Here's my situation...I've volunteered to make a site for a friend, and I'm almost finished. I was planning on going back through my stylesheet later and adding the necessary code for the box model hack. The problem is, that's going to take me forever, and I can only test it when I'm at work, since I don't have Windows at home.

I'd like to implement the hack eventually, but time is of the essence at this point, and I'd just like to get the content up.

What would I need to do to display an appropriate style sheet based on the user's browser? I plan to keep the code of the pages the same, but I figure I'll just give them a different style sheet. Is this a smart way of doing this quickly? Can you help?

Thanks!

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 12:14 am (utc) on Mar. 29, 2005]

orion_rus

6:46 am on Mar 29, 2005 (gmt 0)

10+ Year Member



I think the better way to select needed stylesheet is to make this on a server side. I didn't need to make much code in javascript, but use php or perl or aspx for this
good luck to you!