Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-16 Thread Manfred Staudinger
On 16/04/2008, James Leslie <[EMAIL PROTECTED]> wrote:
> Can anyone explain why you would want to target all non-IE browsers and
>  then all IE browsers?

More realistic example: assume you want to use css 2.1 selectors
(those which are supported even by IE7). This makes it necessary to
hide the rules from IE6 and as a consequence you will end up with 2
very different stylsheets: one for IE6 and below and one for IE7 and
Firefox etc. This could be done with



css for Fx, Opera, Safari and IE 7





I'm not going to say thats beautiful or standards conform. But that is
the documented proprietary selection mechanism called "conditional
comments" for IE.

Regards,

Manfred
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-16 Thread Ingo Chao



Nicholas Wilson wrote:
> ...
> 
> We have to start with:
> 
> 
> 
> Now IE has started a comment, and  think 
> they are not in a comment.

In theory, yes.

In fact IE erroneously believes that 
> ...seen by everything except IE...
> 


This is not correct. It is seen by everything, including IE.

 Do you see me? 

Is currently seen by all browsers including IE due to its comment 
parsing bug.


The IE comment parsing bug can be seen in action here, too.







According to the specs, none of these three lines are visible. This code 
is valid HTML. But in all versions of IE including IE8, the second and 
third line are visible.

Stu Nicholls widely uses this comment parsing bug in his menus, but the 
day IE 9 fixes it and "  

His idea is to close the link in all browsers except IE6 or less. This 
relies on the bug that ", since it will probably change its behavior in future IE.

Ingo

-- 
http://www.satzansatz.de/css.html
http://www.dolphinsback.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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-16 Thread Manfred Staudinger
On 16/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
>  I could not more *strongly* disagree with you, and I'm not sure why you are
> calling my syntax "incorrect" or "unnecessary" either. If they both do the
> same thing, mine not only appears (to me, at least) to be more elegant, but
> is shorter and more understandable. By comparison:
>
>  Mine:
>  
>  ... anything at all, including css here
>  
>
>  and yours:
>
>  
>  ... anything at all, including css here
>  
>
>  It seems a little odd to call my (correct and occasionally necessary)
> syntax "unnecessary" and "incorrect" and then send through a longer, more
> complicated syntax to accomplish the same thing.
>
>  Or am I totally missing something here?
Yes, there is a documentation about this proprietary syntax (as David
Laakso has pointed out)
http://msdn2.microsoft.com/en-us/library/ms537512(VS.85).aspx
and certainly your invention is not covered by it. It is not future
proof too, as MS may come up with an IE which still recognizes
"Downlevel-revealed Conditional Comments" as documented, but not your
variant of it.

Regards,

Manfred
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-16 Thread Alan Gresley
Bill Brown wrote:

> Hi John,
> 
> You can use this syntax to target all NON-MSIE browsers:
> 
> @import url("css/fix/non_msie.css");
> 
> 
> Use this syntax to target ALL MSIE browsers:
> 
> 
> And this will target specific versions of MSIE browsers:
> 
> 
> 
> 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] 


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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-16 Thread Michael Adams
On Wed, 16 Apr 2008 00:27:20 +0200
Manfred Staudinger wrote:

> On 15/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
> >  You can use this syntax to target all NON-MSIE browsers:
> >  
> >  @import url("css/fix/non_msie.css");
> >  
> 
> Thats definitely an unnecessary hack. The correct (although
> proprietary) syntax would be:
> 
> 
> css here
> 
> 
> 

I find these both particularly ugly and use the '@import hack' instead.
Just a normal line in the HTML and the real hack in the CSS code itself.
After all it is the presentation, design or functionality that is the
issue, *not the content*.

This is all i have in the (X)HTML
 

But heres the CSS master file
/* ** master.css ** */

@import url("layout.css");
@import url("colour.css");
@import url("fonts.css");
@import url(.css) all; 

/*  */

That's it; the trick is in that final line. IE loads a file called
"url(.css) all" and all other browsers load a file called ".css". It
relies on a bug in IE. I usually have very few hacks in the ".css" file
compared to the "url(.css) all" file.

I first read about this hack here:
http://annevankesteren.nl/2005/10/ie-import-hack

A full range of @import hacks and browsers affected are here:
http://imfo.ru/csstest/css_hacks/import.php
But my requirements are not that specific.

-- 
Michael

All shall be well, and all shall be well, and all manner of things shall
be well

 - Julian of Norwich 1342 - 1416
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Thierry Koblentz
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> discuss.org] On Behalf Of Nicholas Wilson
> Sent: Tuesday, April 15, 2008 5:00 PM
> To: css-d@lists.css-discuss.org
> Subject: Re: [css-d] How do you feed IE versions different css than w3c
> compliant browsers?
> 
> On Wednesday 16 April 2008 12:58 am Thierry Koblentz wrote:
> 
> > What about a simple:
> >
> > 
> >
> > > Or am I totally missing something here?
> >
> > Could be me ;)
> 
> But then every browser would ignore it, which is presumably not what you
want.


You're right of course. 
I've been working on this [1], so I read the post with that in mind ;)
 
[1] http://tjkdesign.com/lab/HTML_comments_and_Internet_Explorer.asp



-- 
Regards,
Thierry | http://www.TJKDesign.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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread David Laakso

1/
Regarding Conditional Comments, see: Microsoft Developer Network

2/
Regarding using Conditional Comments to feed hacks to IE, see:
On havingLayout (scroll down a little to: "Alternatively, and possibly 
more future proof, are conditional comments:")


__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Nicholas Wilson
On Wednesday 16 April 2008 1:09 am John Griessen wrote:
> Thierry Koblentz wrote:
> > What about a simple:
> >
> > 
>
> This short one looks good...  As I understand this, it goes in default.css,
> so what else besides css code would you want to put here?
>
> John Griessen
> css newbie building his own selling web site.

 style comments go in the HTML file, not the css file.  You can put a 
 in there if you need, but only IE supports 
these type of conditional comments, so you need to use [if IE].  Here is how 
you would build up the logic of the expression:

We have to start with:



Now IE has started a comment, and 

Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Bill Brown
John Griessen wrote:
> Thierry Koblentz wrote:
>> 
> This short one looks good...  As I understand this, it goes in default.css, 
> so what else besides css code
> would you want to put here?

John:

Wrong! It does NOT go in default.css. It is an HTML comment tag...so it 
goes in your HTML source.

And the one you've commented above would not work! It would hide 
whatever you put in there from ALL browsers. Think of conditional 
comments as reverse comments...rather than hiding things from browsers, 
we choose to show something to a particular browser.

Like this:


Anything in this block is shown to any non-IE browser.










and so on...

So you can see how the above could also be used for this:







or this:



   Thanks for not using Internet Explorer.
   You make the world a better place.





That make sense?
Bill
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread John Griessen
Thierry Koblentz wrote:

> What about a simple:
> 
> 

This short one looks good...  As I understand this, it goes in default.css, so 
what else besides css code
would you want to put here?

John Griessen
css newbie building his own selling web site.

-- 
Ecosensory   Austin TX
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Nicholas Wilson
On Wednesday 16 April 2008 12:58 am Thierry Koblentz wrote:

> What about a simple:
>
> 
>
> > Or am I totally missing something here?
>
> Could be me ;)

But then every browser would ignore it, which is presumably not what you want.

Nicholas
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Thierry Koblentz
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> discuss.org] On Behalf Of Bill Brown
> Sent: Tuesday, April 15, 2008 4:27 PM
> To: Manfred Staudinger
> Cc: css-d@lists.css-discuss.org; John Griessen
> Subject: Re: [css-d] How do you feed IE versions different css than w3c
> compliant browsers?
> 
> Manfred Staudinger wrote:
> > On 15/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
> >>  You can use this syntax to target all NON-MSIE browsers:
> >>  
> >>  @import url("css/fix/non_msie.css");
> >>  
> >
> > Thats definitely an unnecessary hack. The correct (although
> > proprietary) syntax would be:
> > 
> > 
> > css here
> > 
> > 
> > Regards,
> > Manfred
> 
> Manfred,
> 
> I could not more *strongly* disagree with you, and I'm not sure why you
> are calling my syntax "incorrect" or "unnecessary" either. If they both
> do the same thing, mine not only appears (to me, at least) to be more
> elegant, but is shorter and more understandable. By comparison:
> 
> Mine:
> 
> ... anything at all, including css here
> 
> 
> and yours:
> 
> 
> ... anything at all, including css here
> 

What about a simple:



> Or am I totally missing something here?

Could be me ;)


-- 
Regards,
Thierry | http://www.TJKDesign.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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Bill Brown
Manfred Staudinger wrote:
> On 15/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
>>  You can use this syntax to target all NON-MSIE browsers:
>>  
>>  @import url("css/fix/non_msie.css");
>>  
> 
> Thats definitely an unnecessary hack. The correct (although
> proprietary) syntax would be:
> 
> 
> css here
> 
> 
> Regards,
> Manfred

Manfred,

I could not more *strongly* disagree with you, and I'm not sure why you 
are calling my syntax "incorrect" or "unnecessary" either. If they both 
do the same thing, mine not only appears (to me, at least) to be more 
elegant, but is shorter and more understandable. By comparison:

Mine:

... anything at all, including css here


and yours:


... anything at all, including css here


It seems a little odd to call my (correct and occasionally necessary) 
syntax "unnecessary" and "incorrect" and then send through a longer, 
more complicated syntax to accomplish the same thing.

Or am I totally missing something here?
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Manfred Staudinger
On 15/04/2008, Bill Brown <[EMAIL PROTECTED]> wrote:
>  You can use this syntax to target all NON-MSIE browsers:
>  
>  @import url("css/fix/non_msie.css");
>  

Thats definitely an unnecessary hack. The correct (although
proprietary) syntax would be:


css here



Regards,

Manfred
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Manfred Staudinger
On 15/04/2008, John Griessen <[EMAIL PROTECTED]> wrote:
> Manfred Staudinger wrote:
>
> > Hi John,
> >
> > If you want to select IE6 and IE7, but not IE8 nor IE5.5 or IE5.01
> > then you might use
> >
> > 
> >
> >
>
>  Thanks,
>
>  very helpful.  Looks like you just put this in line with your stds
> compliant css
>  and the " css here" lines are fed to the version of IE you selected, right?
Yes.

Manfred
__
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/


Re: [css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread Bill Brown
> I have a restructuredtext generated site that now looks as intended in 
> firefox, but not in the IE
> that is installed with Win2K.  IE seems to ignore the css positioning of a 
> list and an image hyperlink.
> 
> http://ecosensory.com/

Hi John,

You can use this syntax to target all NON-MSIE browsers:

@import url("css/fix/non_msie.css");


Use this syntax to target ALL MSIE browsers:


And this will target specific versions of MSIE browsers:



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
__
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/


[css-d] How do you feed IE versions different css than w3c compliant browsers?

2008-04-15 Thread John Griessen
David Laakso wrote:

> You have height:1%; on the below selector.  You may (?) want to feed 
> that only to IE/6, as compliant browsers might do better without it at 
> +2 font-scaling.
> .p5 {
> height: 1%;
> }

I have a restructuredtext generated site that now looks as intended in firefox, 
but not in the IE
that is installed with Win2K.  IE seems to ignore the css positioning of a list 
and an image hyperlink.

http://ecosensory.com/

John Griessen
-- 
Ecosensory   Austin TX
__
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/