I use a very simple rule that will allow for CSS validation... Its the " * html " selector
IE thinks there's an extra element outside the HTML element...as we know there isn't. what this means is we can exploit it for our IE hack. Have a look at the example: #wrapper { /* all browsers other than IE */ width: 300px; padding: 0 5px; } * html #wrapper { /* ignored by everthing but IE */ width: 310px; } I find this the easiest and most simple to keep track of. HTH D On 8/9/05, David Laakso <[EMAIL PROTECTED]> wrote: > Wayne Godfrey wrote: > > > I feel a bit dumb asking this, but there's so much to learn and some > > things sink in better than others! Anyway, I've had to do some hacks > > to get IE to display my site correctly. Now those hacks are causing my > > CSS to not validate. The question is what is the proper way to fix > > this predicament? > > [...] > > > > Wayne Godfrey > > [EMAIL PROTECTED] > > > One method is to feed styles to good browsers in the usual manner; and > feed ie its styles using 'conditional comments.' > The good guys get everything but the hacks: style.css > <link rel="stylesheet" href="style.css" type="text/css" /> > The evil one gets only the hacks: style-ie.css (note the re-name for > this ie file). > <!--[if lte IE 6]> > <link rel="stylesheet" href="style-ie.css" type="text/css" > /> > <![endif]--> > The validator will not see or choke on the 'conditional comments' so > you'll validate; and you are good to go when IE7 hits the street. > Regards, > David Laakso > > > -- > David Laakso > http://www.dlaakso.com/ > > > ****************************************************** > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ****************************************************** > > ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************