views:

65

answers:

2

definately one or the other, not one and the other if.... HTML doesnt have an else function.. or does it? could you please be so kind as to code it in your answer im a php newb but so far getting nice results! this one's got be buggered though.

if browser = IE then css/ie.css else css/moz

even a webkit 3rd option if you think its needed...

thanks guys you're all marvelous.

also, does anyone know of a full properties list for webkit transitions/css?d

+8  A: 

You can use this:

<!--[if lt IE 7]><link rel="stylesheet" href="/iestyles.css" /><![endif]-->

Using these conditionals will also reduce the load on your server (albeit it isn't much right now) because the client will do the processing, rather than your server (which could potentially get it wrong and your page would look weird)

webdestroya
I agree, conditionals are the way to go for this. It's the simplest most bulletproof way.
patricksweeney
yeah i have a whole seperate css for ie, otherise there are too many hacks needed.
rowan
Yea, you can add the conditionals to anything you want. You can load multiple CSS scripts, javascript, just about anything you want.
webdestroya
but that would read both with IE yeah? which one is followed?
rowan
@rowan: The IE styles would override the original ones.
Daniel Vassallo
Yes, it would override the style, but you might only need to change the things that are specific to IE (depending on your design)
webdestroya
even with the original ones being unconditional? i tried that, changed a color on the ie file and it showed the moz version in IE
rowan
try adding `!important` to the styles maybe? I know the conditional works... I have used it on my site many times, and it is recommended by Microsoft.
webdestroya
A: 

Try this: http://www.webdevout.net/css-hacks

Jorge