Conditional CSS

Soldato
Joined
12 Nov 2004
Posts
2,527
Location
Bath
I know its possible to tell certain browsers use certain css files, but is it possible for windows computers to read one css file and mac computers to read a different css?

The reason i'm asking is the site i'm working on fonts appear a bit heavier on the mac then on the computer (I have no idea why).
 
You could use PHP to output the right stylesheet in the header.

One of the HTTP headers sent by my browser is
Code:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

This tells you their OS, and using PHP you could tell what OS they are using, asuming their browser sends the right headers.
 
JonB said:
It's to do with helvetica or some such. The graphics guy at work explained it to much, but i've forgotten now. As for different .css files. Try some condition HTML.

http://www.quirksmode.org/css/condcom.html

The problem with that (well the problem I have with it) is that you cant use templates on your site which is a bit annoying if you want to change a small bit of each page to say the least.

There may be a fix to this (if so please tell me!) :p
 
Back
Top Bottom