Re: css hack for IE: is using the * acceptable
- From: "windandwaves" <winandwaves@xxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 02:35:48 +1300
Toby Inkster wrote:
> windandwaves wrote:
>
>> Someone taught me that using the following is like an IE hack:
>> div#mydiv {padding: 10px; * padding: 12px;}
>
> I've never seen this, and don't know whether it works, but it's
> invalid. Better to do something like:
>
> DIV#mydiv
> { padding: 10px; }
> HTML>BODY DIV#mydiv
> { padding: 12px; }
>
> which works and is valid.
It works fine. Your example I think works the other way. It works in all
browsers but IE
What I do is that I work out using php what browser it is and then serve a
different stylesheet.
However, I noticed that the asterix works fine. Just try it. It is
invalid, but that is the exact reason you do it. So that firefox, etc... do
not go for the padding 12px, while IE ignores the * and applies padding
12px.
Ta
- Nicolaas
.
- Follow-Ups:
- Re: css hack for IE: is using the * acceptable
- From: Rossz
- Re: css hack for IE: is using the * acceptable
- From: Toby Inkster
- Re: css hack for IE: is using the * acceptable
- From: Benjamin Niemann
- Re: css hack for IE: is using the * acceptable
- References:
- css hack for IE: is using the * acceptable
- From: windandwaves
- Re: css hack for IE: is using the * acceptable
- From: Toby Inkster
- css hack for IE: is using the * acceptable
- Prev by Date: Website creation software - please help (also in alt.comp.linux)
- Next by Date: Text size
- Previous by thread: Re: css hack for IE: is using the * acceptable
- Next by thread: Re: css hack for IE: is using the * acceptable
- Index(es):
Relevant Pages
|