Bill Brown wrote:

> Hi John,
> 
> You can use this syntax to target all NON-MSIE browsers:
> <!--[if !IE]> <-->
> <style type="text/css">@import url("css/fix/non_msie.css");</style>
> <!--> <![endif]-->
> 
> Use this syntax to target ALL MSIE browsers:
> <!--[if IE]>
> <style type="text/css">@import url("css/fix/all_msie.css");</style>
> <![endif]-->
> 
> And this will target specific versions of MSIE browsers:
> <!--[if IE 6]>
> <style type="text/css">@import url("css/fix/msie_6_0.css");</style>
> <![endif]-->
> <!--[if IE 7]>
> <style type="text/css">@import url("css/fix/msie_7_0.css");</style>
> <![endif]-->
> 
> CSS in the last three will not be seen by the validator, the first one 
> will (the non-msie syntax). This is important if you care about validation.
> 
> Additionally, this sort of technique has advocates and opponents. It 
> uses two semi-frowned-upon approaches:
>    1. Proprietary syntax.
>    2. Browser sniffing.
> 
> I use it because it also one of the most failsafe methods for targeting 
> the two type of browsers: Nice, standards-compliant, user and developer 
> friendly browsers...and anything made my Microsoft.
> 
> Hope it helps.
> --Bill Brown
> TheHolierGrail.com


Conditional Comment are hacks which are condoned by Microsoft. You can't 
say one kind of hack is different from another when they serve the same 
purpose which is feeding alternative style rules to a browser.

What you see here.

http://blogs.msdn.com/ie/archive/2005/10/12/480242.aspx

Is the infamous "Call to action: The demise of CSS hacks and broken 
pages." One of the CSS hacks to target IE5 to IE6 is.

* html E {...}

I have be told that this is a dangerous hack. This hack is not dangerous
since it is using a true element in the document tree. The universal
selector '*' is targeting an element outside the HTML element and was 
purposely placed in the trident tree branch code and was forgotten about 
for many years. I have had that said to me personally in email by the 
person who introduced it in the first place. Tantek Çelik even declares 
that star html is not a hack [1].


[1] <http://tantek.com/log/2005/11.html>


Alan

http://css-class.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to