I'm no wiz with getting my new code which I plan on doing over in css3 -but what if I am worried about browsers that are not compatible with it -how would I go about coding my css to revert to older code?
I'm no wiz with getting my new code which I plan on doing over in css3 -but what if I am worried about browsers that are not compatible with it -how would I go about coding my css to revert to older code?
I don't suggest using CSS3 since not even modern browsers fully support it. Wait a few more years before actually using it.
Here's a great resource regarding CSS features supported in commonly used browsers:
http://www.webdevout.net/browser-support-css
evan (01-16-2011)
You can use css3 wherever it is not critical - for extra effects, etc. - as long as it won't break your layout or make something unusable.
With some properties, you can use "fallbacks" - for example, css3 allows gradients and semi-transparent backgrounds:the css2 browser ignore the second rule because it doesn't understand it, and shows the background image (which is supposedly a similar color and opacity). The css3 browser understands hsla, so it "overrules" the previous background rule.Code:div{ background: url(semi-transparent.png); } div{ background: hsla(0,100%,50%,0.2); }
You can also look into using javascript to provide css3 effects in browsers that don't support them. That all depends on how important a particular effect is to you.
evan (01-16-2011)
Thank you, I need to know hoe to write a conditional statement to derect what browser or device someone has so the right CSS will be applied -as with a mobile device.
Bookmarks