CSS depending on Browser

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
phppage
Forum Contributor
Posts: 126
Joined: Mon Apr 24, 2006 1:47 pm
Location: West Yorkshire, UK

CSS depending on Browser

Post by phppage »

Not sure if this should be here or client side but I think the backbone of this is PHP.

I have two CSS files one for IE and the other for Gecko browsers. Had a look at some hacks and ways of selecting different css but all looked like they could change on the next release of the browser. I was wondering if I could use get_browser function in PHP and parse a different CSS file depending on results. If browscap files being quite large could this be around the houses way of doing it? Just don't like the idea of leaving it up to the client.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can use get_browser(), but I'd stick with conditional comments if possible.
Post Reply