Paul Noone wrote:
> So we're very close here then?
Pretty close :)
> Would something like this be appropriate and still validate?
Conditional comments only validate in the sense that the validator
doesn't recognise them as anything other than comments and hence ignores
the content. So, your page will validate against automated checking, but
technically you are using invalid code
Given that I only deliver that code to compensate for browser lacks and
due to client demand, I can live with that. Some people can't, so it is
up to you and your client to determine if this is an appropriate course
> <!--[if IE]>
>
> <style type="text/css">@import "IE-override.css";</style>
>
> <![endif]-->
I prefer to be more specific. The minimum condition I'd use in this case
is:
<!--[if lte IE 6]>
The 'lte' stands for 'Less Than or Equal'. That way, it won't be causing
any hassles with IE7 or 8 or whatever
Ideally, of course, you would have such separate hacks files for each
version of IE you were supporting:
<!--[if IE 6]>
<style type="text/css">@import "IE6-override.css";</style>
<![endif]-->
<!--[if IE 5.5]>
<style type="text/css">@import "IE5-5-override.css";</style>
<![endif]-->
<!--[if IE 5]>
<style type="text/css">@import "IE5-0-override.css";</style>
<![endif]-->
That way, you can simply remove each as you no longer support that
browser for the site. See PPK's article on Conditional Comments for more
details: http://www.quirksmode.org/css/condcom.html
Cheers
Lachlan
PS Must be Friday, I even managed to deliver some philosophical
moralising in the middle there - sorry about that, folks. Must be time
for beer!
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************