If you've tried writing web pages that are compatible with all reasonable browsers, the first thing you learned that Internet Explorer is un reasonable. It totally screws up like half the CSS standards.
Turns out there's a project to redefine how IE parses a number of CSS expressions so that you could use the exact same stylesheet with IE and FireFox.
http://dean.edwards.name/IE7/intro/
I was skeptical until I saw the famous Complex Spiral demo page actually render correctly in my IE. That totally blew my mind.
They have everything on there-- the full range of CSS selectors, PNG transparency, proper support for fixed background, min-width, hover, you name it. You just download the library and call it from the beginning of your document.
There's another approach. If you don't use all those features, just one or two, you might be able to get away with copying them and putting them into .htc files. An .htc file is a javascript file that IE references to find out what behavior is expected of it.
So for instance if you want IE to know how to handle PNG files with transparent backgrounds, you would have the CSS file for IE say something like...
img { behavior: url(pngtransparent.htc); }
The pngtransparent.htc file in this example would be the file that contains the javascript code for interpreting PNG transparency which you copied from the IE7 stuff. Just make sure that if you go the htc route that you set apache to serve files with the htc extension as the text/x-component MIME type (cPanel lets you do this through the 'MIME Types' icon).
Turns out there's a project to redefine how IE parses a number of CSS expressions so that you could use the exact same stylesheet with IE and FireFox.
http://dean.edwards.name/IE7/intro/
I was skeptical until I saw the famous Complex Spiral demo page actually render correctly in my IE. That totally blew my mind.
They have everything on there-- the full range of CSS selectors, PNG transparency, proper support for fixed background, min-width, hover, you name it. You just download the library and call it from the beginning of your document.
There's another approach. If you don't use all those features, just one or two, you might be able to get away with copying them and putting them into .htc files. An .htc file is a javascript file that IE references to find out what behavior is expected of it.
So for instance if you want IE to know how to handle PNG files with transparent backgrounds, you would have the CSS file for IE say something like...
img { behavior: url(pngtransparent.htc); }
The pngtransparent.htc file in this example would be the file that contains the javascript code for interpreting PNG transparency which you copied from the IE7 stuff. Just make sure that if you go the htc route that you set apache to serve files with the htc extension as the text/x-component MIME type (cPanel lets you do this through the 'MIME Types' icon).
