1 reply [Last post]
dk
Offline
Regular
Last seen: 16 years 34 weeks ago
Joined: 2004-02-25
Posts: 11
Points: 0

I'm trying to design a site for IE/Netscape/Mozilla/Opera. Is it better to try one big stylesheet or to check for which browser the user is using and then give them the corresponding stylesheet? My main reason for this question is that once I get something to look perfect in IE if I go to Mozilla or Opera and sometimes both it inevitably looks completely different! This has gotten to be way too frustrating! Any help is greatly, greatly appreciated. :?

F*SH
Offline
Regular
Last seen: 13 years 18 weeks ago
Joined: 2004-02-22
Posts: 36
Points: 0

One or Multiple Stylesheets for all browsers?

Firstly, make sure your CSS is all valid and all to minimise browser discrepancies. If there are still big problems, a multi-stylesheet approach would work. If you're using PHP etc, it's easy to send the right stylesheet link (look at the user agent). Otherwise, it could be done in JavaScript and maybe even with some elaborate HTML/CSS. Otherwise, if there's only a few problems, look for browser-specific workarounds..

I use 2 stylesheets on my site at any one time, one changes depends on the skin the user has selected and the other remains constant.