Use HTML5 and Advanced CSS Features Now

The website says it best:

Have you ever wanted to do if-statements in your CSS for the availability of cool features like border-radius? Well, with you can accomplish just that!

Modernizr is a small (7kb) JavaScript file that checks the user’s browser and determines which advanced features are supported, then appends classes to the body element like .borderradius or .no-borderradius. You can then target browsers with CSS like:
.borderradius h1{//styles you want these users to get...}
.no-borderradius h1{//and styles you want these users get...}

As an added bonus, Modernizr also adds HTML5 support similar to the IE Shiv!

Pretty cool stuff!

Happy Modernizing, and thanks for Dan “the Man” Mendelsohn for turning me on to this,
Atg

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)