Selectivizr & Modernizr Web Developer, London

Selectivizr & Modernizr

There are several small javascripts out there which can aid CSS maintenance by allowing better handling of legacy browsers.

Two of the more popular of these are Selectivizr and Modernizr which we use here at


The key point of this javascript is to ensure that CSS3 selectors, or at least some of them, function even on legacy browsers such as Internet Explorer 6-8. I find using Selectivizr is preferable to adding further code to cater for these browsers, and it will be easy to later remove this script once i drop support for these browsers at a later date.

Attribute selectors, plus first and last child are some of the selectors which will now be picked up by these older browsers, possibly enabling you to avoid using classes like “first” and “last” which shouldn’t now be necessary.


Modernizr is a related script which makes it easier to handle support for different items such as CSS3 selectors as well as HTML5 functionality. You will be able to make use of simple CSS classes to handle browsers which do and do not handle HTML5 Localstorage, for example. The same classes are commonly used in both standard css files as well as javascript. These classes are inserted into the body tag on the fly and offer us the immediate opportunity to see what is available in each browser, through the likes of Firebug which display live code.

If you would like to learn more about these two items, please check out there specific websites below, where you can download and use the javascripts in your own projects. You will also find extensive documentation on making the best use of them too.

Find More on Selectivizr & Modernizr

Leave a Reply

Your email address will not be published. Required fields are marked *