Tom Butler's programming blog

CSS3 in Internet Explorer

CSS3 in IE

Please note: With IE9+ taking significant market share, this project is no longer maintained. If you are looking for a similar tool check out CSS3 PIE

This is a script based on Remiz Rahnas's border-radius.htc file for Internet explorer which allowed the use of border-radius in IE.

I have extended the script, fixed a large number of bugs, added functionality and restructured the code to make it more extensible going forward.

CSS3 Support for:

Usage

Download the htc file (above) Add this line to the top of your CSS file

For CSS3 defined in stylesheets:

PHP Code:

html {behaviorurl('css3.htc');}

That's it! Just attach it to the HTML element and you're done. Use the CSS3 styles in your stylesheet and they will just work. You only need to attach the HTC to the HTML element.

Note that the URL is relative to the location of the CSS file. Put the .htc in the same directory as your CSS file.

If you are using CSS3 in inline styles, you will need to specify the behavior as well:

PHP Code:

<div style="border-radius: 20px; behavior: url('css3.htc');"> </div>

Feedback

Please send any comments/suggestions to tom@r.je.

to do list

I plan to add support for several more CSS3 features. This list is what I still would like to do and how easy I think they will be

Updates

27/10/2010

Changes made

The full list of changes made by me are:

IE6 Support

For IE6 support, the page must be running in standards mode. It is currently buggy. As it stands, border-radius, text-shadow and box-shadow work. RGBA and gradient support is missing.