RE: [WSG] old underscore hack question

2008-07-19 Thread Thierry Koblentz
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of David Hucklesby
> Sent: Saturday, July 19, 2008 4:10 PM
> To: wsg@webstandardsgroup.org
> Subject: Re: [WSG] old underscore hack question
> 
> On Fri, 18 Jul 2008 23:52:44 +0100, kevin mcmonagle wrote:
> > hi,
> > i want to use the underscore hack instead of conditional comments
because it
> will be
> > easier to keep track of image paths. Its only an ie6 because
transparency
> workaround.
> > In my understanding the below code should only serve the gif to ie 6,
not
> later
> > versions?
> > but IE net renderer is rendering the gif in all ie versions. Its not
really
> like that
> > in a real "life" right?
> >
> > #shell{
> > background:url(../images/bgshad.png);
> > _background: url(../images/iebg.gif);
> > margin:0 auto;
> > background-repeat:repeat-y;
> > }
> 
> You are correct. The underscore hack works with IE 5 and 6 only.
> An extension of this is to use an asterisk instead of an underscore
> to hack for IE7 as well. Obviously you don't need that, but I mention
> it for completeness.

As a side note, when using these hacks (_property and *property) in a last
declaration, it is important to terminate that declaration with a ";" to
prevent breakage in Safari v2

selector {property:value;_property:value} /* no safe for Safari v2 */

selector {property:value;_property:value;} /* safe for Safari v2 */


-- 
Regards,
Thierry | http://www.TJKDesign.com



 



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] old underscore hack question

2008-07-19 Thread David Hucklesby
On Fri, 18 Jul 2008 23:52:44 +0100, kevin mcmonagle wrote:
> hi,
> i want to use the underscore hack instead of conditional comments because it 
> will be
> easier to keep track of image paths. Its only an ie6 because transparency 
> workaround.
> In my understanding the below code should only serve the gif to ie 6, not 
> later
> versions?
> but IE net renderer is rendering the gif in all ie versions. Its not really 
> like that
> in a real "life" right?
>
> #shell{
> background:url(../images/bgshad.png);
> _background: url(../images/iebg.gif);
> margin:0 auto;
> background-repeat:repeat-y;
> }

You are correct. The underscore hack works with IE 5 and 6 only.
An extension of this is to use an asterisk instead of an underscore
to hack for IE7 as well. Obviously you don't need that, but I mention
it for completeness.

FWIW - I use these hacks while fixing up IE oddities during development.
I think it preferable to use another technique for the final cut, though.
Something like the one Manny Blum suggests looks good.

Also perhaps relevant, or perhaps not -- you can combine GIF-like
binary transparency with alpha transparency in a single 8-bit PNG.[1][2]
Not so good if you really do need more colors, but an alternative.

[1] 
[2] 

Cordially,
David
--



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] old underscore hack question

2008-07-19 Thread Manny Blum

If you don't want to use conditionals, then try this:

#shell {
background: url(../images/iebg.gif);
margin:0 auto;
background-repeat:repeat-y;
}

html>body #shell {
background: url(../images/bgshad.png);
}

IE can' read the second block of code cause it gets confused by  
html>body, all other browsers have no problems with it.


Hope this helps. I've never heard of the underscore hack.


On Jul 18, 2008, at 6:52 PM, kevin mcmonagle wrote:


hi,
i want to use the underscore hack instead of conditional comments  
because it will be easier to keep track of image paths.

Its only an ie6 because transparency workaround.
In my understanding the below code should only serve the gif to ie  
6, not later versions?

but IE net renderer is rendering the gif in all ie versions.
Its not really like that in a real "life" right?

#shell{ background:url(../images/bgshad.png);
_background: url(../images/iebg.gif);
margin:0 auto;
background-repeat:repeat-y;
}

thanks in advance
-kevin



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***