Chris Akins wrote:
> Regarding CSS targeted to IE via conditional comments what is the
> current consensus or is there one?

Given we have more than one option; I don't think there's a consensus on 
how to do any of this.

For instance - I most often do it this way...

<http://www.gunlaug.no/contents/wd_additions_12.html>

> I would guess it's best to use the conditional just to link to an
> external, IE-only stylesheet rather that including the IE styles in
> the conditional comment itself for the same reason we do that with
> better browsers.  Is this proper thinking?

If IE-only styles for one page only - include styles in page.
If IE-only styles for multiple pages - link to a stylesheet.
...I think.

> Also - am I better served to round up any and all "* html" rules in my
> CSS and throw them all in a separate IE-only stylesheet w/out the
> hack, then call it in via the conditional comments?  What advantages
> are there to this method other than the main stylesheet being cleaner?

Probably none if you only have "corrections" for IE6 and lower.
If you also have to "fix" IE7 here and there, then the advantage of 
having IE corrections in a separate stylesheet grows.

>  Any downsides?

An extra call to a stylesheet for those IE versions in need of one. No 
big deal IMO.

> Just trying to get all my ducks in a row, make things nice an tidy,
> before soon rolling out new templates to other departmental web folks.

I'd look at "ease of maintenance" before anything else, and that often 
depends on previous practices. "New method = hard" vs. "old method = 
easy", is often the case, but the old methods may have become so bad and 
impractical that "new method = good" - almost whatever it is :-)

> Lastly, can someone point me to a resource that will help me tear
> apart and understand this type of construct:
> 
> #wrapper {width: 780px /* fallback value */;
> width:expression(((document.compatMode &&
> document.compatMode=='CSS1Compat') ?
> document.documentElement.clientWidth :
> document.body.clientWidth)
>> 1260 ? "1200px" : (((document.compatMode &&
> document.compatMode=='CSS1Compat') ?
> document.documentElement.clientWidth :
> document.body.clientWidth) < 820 ? "780px" : "95%"));
> 
> I understand parts of it but things like "document.compatMode &&
> document.compatMode=='CSS1Compat'", etc. are not clicking that well
> yet.  :-)  

<http://msdn.microsoft.com/en-us/library/ms533687(VS.85).aspx>

...for short: check if IE6/7 are in "standard mode" or "quirks mode". 
Older versions are always in "quirks mode" anyway.

I've tried to expand some uses of IE expressions a bit on my site...

<http://www.gunlaug.no/contents/wd_additions_14.html>
<http://www.gunlaug.no/contents/wd_additions_15.html>
<http://www.gunlaug.no/contents/wd_additions_20.html>
<http://www.gunlaug.no/contents/wd_additions_22.html>
<http://www.gunlaug.no/contents/wd_additions_27.html>

...but Microsoft tend to kill all useful information about anything 
after a while, so most about IE expressions on their site is already 
gone and made my links to it useless.

Reading through my pages and cross-referencing with Javascript (which IE 
expressions can be seen as a sub-set of) should give you some clues.

The "(non-Microsoft) external references" on some of my pages are also 
still working, and I only had those links, and no knowledge about 
Javascript, when I created my expressions.

> I'd like to eventually understand these types of things
> enough to be able to write my own and not always have to copy and
> paste something someone has sent me.

Always better to understand something and be able to build on, modify 
and/or maintain it, than to do blind copying.
...I think I've written something like that before - somewhere.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
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