1.11M Members

How to get CSS version number for a particular browser.

 
0
 

Hi All,

I am struggling to get the version of css supported in my browser. Is there any way to get it through javascript.

Thanks

 
0
 

Never used it myself, but a quick google search lead me to

Modernizr

 
0
 

WHY would you need this info?

All current browsers support css2, no browser supports more than a couple of bits of css3. The latest versions of firefox support a few more bits of css3 than most other browsers, but as css3 is still only at the discussion stage, you should just work with css2, unless you have a specific bit of code that you wish to use and you know the javascript alternative to use for other browsers, or just accept that it will not be displayed in other browsers. Because if the browser can't read your code, it just ignores it.

So, if you really need to know the version of css used, the answer is almost always css2, as css3 hasn't been got past the discussion stage.

 
0
 

@drjohn: First of all thanks for the info. And Why I want to know? Because I want to know.

OK currently CSS2 is used in most of the browsers but how would I now when my browser start supporting CSS3.

 
0
 

You will "now" when your browser starts supporting CSS3 because it will be listed in features or "whats new" when you get a browser update.

 
0
 

@macneato: Thanks for correcting the typo "now" :D.

But still I just want to know is there any way to get it in javascript.

 
0
 

Told you to take a look at Modernizr, link to the website is above. Think its jquery

 
0
 

Current browsers will not change their CSS support, it is only when new releases occur that they will start supporting CSS3. So when Firefox 4 or IE9 comes out, you will read about the new improved level of CSS3 support. But as CSS3 is still at the discussion stage, don't expect anything to change for several years. Just stick to using CSS2 and the odd bits that FF supports, and accept that without adding JS support for a few features, IE8 users (and those with even older versions) will not see the extras you add. It is not a problem in any way. Just don't imagine that your CSS2 designs will suddenly stop working - they will not.

Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: