Nowadays I just use a separate stylesheet for IE6 and IE7 and use
conditional comments.
You can tweak and fix problems in both browsers and compliant browsers
never get to see that code.
No more hacks necessary!
This goes into my html:
<!--[if gt IE 6]>
<link rel="stylesheet" href="ie7.css" media="screen">
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="ie6.css" media="screen">
<![endif]-->
Erwin Heiser
On Sun, 17 Dec 2006 04:11:28 1100, [email protected]
<[email protected]> wrote:
From: "Rafael Mumme" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 15:14:51 -0200
Subject: ie-only hack
Is it safe to use this hack?
<style>
.foo { background:red;width:100px;height:100px; }
.ie-only.foo { background:blue; }
</style>
It works in IE 6 and IE 7. Will Microsoft support this in next versions of IE?
Thanks.
From: "Rob Kirton" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 17:29:47 +0000
Subject: Re: [WSG] ie-only hack
Rafael
I would recommend never hack. Where you feel it absolutely necssary / it is
totally unavoidable use external style sheets and call using I.E.
conditional comments
--
Regards
- Rob Kirton
Raising web standards : http://ele.vation.co.uk
Connecting to others : http://www.linkedin.com/in/robkirton
On 15/12/06, Rafael Mumme <[EMAIL PROTECTED]> wrote:
>
> Is it safe to use this hack?
>
> <style>
> .foo { background:red;width:100px;height:100px; }
> .ie-only.foo { background:blue; }
> </style>
>
> It works in IE 6 and IE 7. Will Microsoft support this in next versions
> of IE?
>
> Thanks.
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> *******************************************************************
>
>
From: David Dorward <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 17:34:20 +0000
Subject: Re: [WSG] ie-only hack
On Fri, Dec 15, 2006 at 03:14:51PM -0200, Rafael Mumme wrote:
> Is it safe to use this hack?
It's a hack, so no.
> <style>
> .foo { background:red;width:100px;height:100px; }
> .ie-only.foo { background:blue; }
> </style>
>
> It works in IE 6 and IE 7.
If by "it works" you mean that IE 6 and 7 get a red background while
other browsers get a blue background, then you'd be right.
Internet Explorer doesn't support combinations of multiple class
selectors.
> Will Microsoft support this in next versions of IE?
Support the hack? No, if the hack continues to work it will be because
they haven't gotten around to fixing the bug. They support conditional
comments (which, since they don't depend on bugs or lack of support in
CSS parsers, are rather more dependable).
Support combinations of multiple class selectors? I hope so.
--
David Dorward http://dorward.me.uk
From: Barney Carroll <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 18:28:16 +0000
Subject: Re: [WSG] ie-only hack
Cool hack, Rafael
I love the way people live in constant fear of Microsoft fixing bugs.
And when their developers eventually do sit down to tackle IE's problems
and release an update, they're not going to tackle any of the crippling
rendering problems and will instead devote their time to removing all
the life-saving compiling methods.
Based on personal experience, I find no real cause for worry.
An ".ie-only" selector is a fantastic little creature that I hadn't seen
before. It has the advantage of being semantic - people will look at
your code and know what's going on.
My alternative is ending your selector with a comma "," which causes
everything apart from IE to ignore the rule. I'd say that in this case
IE performs logically, but (especially if you don't know about it) it's
easily missed and can easily confuse my target audience (other designers
reading through my CSS code).
But whereas the star hack "* html" relies on a bug which remains (it is
often used to compensate for behaviour that IE7 has mostly fixed, so I
hardly think the sites that rely on it are turning in their graves), I
think the two hacks above are not exploiting bugs (I can't imagine
.ie-only being a mistake, somehow).
Regards,
Barney
From: "Thierry Koblentz" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 11:08:52 -0800
Subject: Re: [WSG] ie-only hack
Barney Carroll wrote:
> An ".ie-only" selector is a fantastic little creature that I hadn't
> seen before. It has the advantage of being semantic - people will
> look at your code and know what's going on.
Actually, unless I'm missing something, it should be ".non-ie"
---
Regards,
Thierry | www.TJKDesign.com
From: Mariusz Nowak <[EMAIL PROTECTED]>
Date: Sat, 16 Dec 2006 00:28:13 +0100
Subject: Re: [WSG] Semantics of news
Rob O'Rourke wrote:
>>
>> <ul class="news-articles">
>> <li>
>> <p class="date">09-12-2006</p>
>> <h2>Article title</h2>
>> <p>Excerpt here....</p>
>> <p><a href="full-article">Read the whole thing</a></p>
>> </li>
>> </ul>
> James.I think using 'p' element is more appropriate as date it's text
> content. So:
>
> I'd hesitate to use <p> tags like that because I wouldn't say the date
> is a paragraph. Spans and divs are perfectly acceptable content
> containers but i'm just nitpicking again.
>
> Rob O
Why you wouldn't say that date in this case is not paragraph?
Paragraph in html is just block of text and this is block of text
content isn't?
We don't have 'date' element in html therefore we need to take more
universal element which in first row for me is 'p'.. (universal element
for text content).. after that would be 'div' which is universal for any
content but I think using it to wrap text is nearly same misconception
as using divs for lists.
--
Mariusz Nowak
Skype: mariuszn3
AIM: mariuszn3
WWW: http://www.medikoo.com
XHTML/CSS Coding: http://cxc.medikoo.com
From: "Chris Broadfoot" <[EMAIL PROTECTED]>
Date: Sat, 16 Dec 2006 11:22:15 +1100
Subject: RE: [WSG] ie-only hack
Rob Kirton wrote:
> I would recommend never hack. Where you
> feel it absolutely necssary / it is totally
> unavoidable use external style sheets and
> call using I.E. conditional comments
+1 on the conditional comments. Helps you validate your CSS too!
Chris
**************************************************************
Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
**************************************************************
From: "Rafael Mumme" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 15:14:51 -0200
Subject: ie-only hack
Is it safe to use this hack?
It works in IE 6 and IE 7. Will Microsoft support this in next versions of IE?
Thanks.
From: "Rob Kirton" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 17:29:47 +0000
Subject: Re: [WSG] ie-only hack
Rafael
I would recommend never hack. Where you feel it absolutely necssary / it is
totally unavoidable use external style sheets and call using I.E. conditional
comments
--
Regards
- Rob Kirton
Raising web standards : http://ele.vation.co.uk
Connecting to others : http://www.linkedin.com/in/robkirton
On 15/12/06, Rafael Mumme <[EMAIL PROTECTED]> wrote:
> Is it safe to use this hack?
>
> <style>
> .foo { background:red;width:100px;height:100px; }
> .ie-only.foo { background:blue; }
> </style>
>
> It works in IE 6 and IE 7. Will Microsoft support this in next versions of
IE?
>
> Thanks.
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> *******************************************************************
>
>
From: David Dorward <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 17:34:20 +0000
Subject: Re: [WSG] ie-only hack
On Fri, Dec 15, 2006 at 03:14:51PM -0200, Rafael Mumme wrote:
> Is it safe to use this hack?
It's a hack, so no.
>
>
> It works in IE 6 and IE 7.
If by "it works" you mean that IE 6 and 7 get a red background while
other browsers get a blue background, then you'd be right.
Internet Explorer doesn't support combinations of multiple class
selectors.
> Will Microsoft support this in next versions of IE?
Support the hack? No, if the hack continues to work it will be because
they haven't gotten around to fixing the bug. They support conditional
comments (which, since they don't depend on bugs or lack of support in
CSS parsers, are rather more dependable).
Support combinations of multiple class selectors? I hope so.
--
David Dorward http://dorward.me.uk
From: Barney Carroll <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 18:28:16 +0000
Subject: Re: [WSG] ie-only hack
Cool hack, Rafael
I love the way people live in constant fear of Microsoft fixing bugs.
And when their developers eventually do sit down to tackle IE's problems
and release an update, they're not going to tackle any of the crippling
rendering problems and will instead devote their time to removing all
the life-saving compiling methods.
Based on personal experience, I find no real cause for worry.
An ".ie-only" selector is a fantastic little creature that I hadn't seen
before. It has the advantage of being semantic - people will look at
your code and know what's going on.
My alternative is ending your selector with a comma "," which causes
everything apart from IE to ignore the rule. I'd say that in this case
IE performs logically, but (especially if you don't know about it) it's
easily missed and can easily confuse my target audience (other designers
reading through my CSS code).
But whereas the star hack "* html" relies on a bug which remains (it is
often used to compensate for behaviour that IE7 has mostly fixed, so I
hardly think the sites that rely on it are turning in their graves), I
think the two hacks above are not exploiting bugs (I can't imagine
.ie-only being a mistake, somehow).
Regards,
Barney
From: "Thierry Koblentz" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 11:08:52 -0800
Subject: Re: [WSG] ie-only hack
Barney Carroll wrote:
> An ".ie-only" selector is a fantastic little creature that I hadn't
> seen before. It has the advantage of being semantic - people will
> look at your code and know what's going on.
Actually, unless I'm missing something, it should be ".non-ie"
---
Regards,
Thierry | www.TJKDesign.com
From: Mariusz Nowak <[EMAIL PROTECTED]>
Date: Sat, 16 Dec 2006 00:28:13 +0100
Subject: Re: [WSG] Semantics of news
Rob O'Rourke wrote:
>>
>>
>>
>>
09-12-2006
>>
Article title
>>
Excerpt here....
>>
Read the whole thing
>>
>>
> James.I think using 'p' element is more appropriate as date it's text
> content. So:
>
> I'd hesitate to use
tags like that because I wouldn't say the date
> is a paragraph. Spans and divs are perfectly acceptable content
> containers but i'm just nitpicking again.
>
> Rob O
Why you wouldn't say that date in this case is not paragraph?
Paragraph in html is just block of text and this is block of text
content isn't?
We don't have 'date' element in html therefore we need to take more
universal element which in first row for me is 'p'.. (universal element
for text content).. after that would be 'div' which is universal for any
content but I think using it to wrap text is nearly same misconception
as using divs for lists.
--
Mariusz Nowak
Skype: mariuszn3
AIM: mariuszn3
WWW: http://www.medikoo.com
XHTML/CSS Coding: http://cxc.medikoo.com
From: "Chris Broadfoot" <[EMAIL PROTECTED]>
Date: Sat, 16 Dec 2006 11:22:15 +1100
Subject: RE: [WSG] ie-only hack
Rob Kirton wrote:
> I would recommend never hack. Where you
> feel it absolutely necssary / it is totally
> unavoidable use external style sheets and
> call using I.E. conditional comments
+1 on the conditional comments. Helps you validate your CSS too!
Chris
**************************************************************
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]
*******************************************************************