woensdag 6 mei 2009

Maintainable CSS

For the project I'm currently doing, I need some IE hacks in my CSS stylesheets.
Up to now, I've been using the following approach: I have one base.css, which includes a layout.css, a color.css and a typography.css. This approach seems to be working well until now, but my css code is getting dirty by the various CSS hacks I've been applying to get IE6 to do whatI want it to do.


So now I'm thinking to split off all the IE6 anomalies in a separate baseIE.css, using the conditional include in the html file:

<!--[if IE.xx]>
<link rel="stylesheet" type="text/css" media="screen" href="/css/IEstylesheet.css">
<![endif]-->

This way, base.css will be much clearer, and the whole code will be easier to maintain.

Geen opmerkingen:

Een reactie posten