[css-d] IE7 special code

2007-03-20 Thread Pelle
Hi all.

I have this in my CSS
* html .clearing {display:none;}

i NEED this to imp+lement in IE7 too, but NOT in Ffx or so.
What is the bug code for this?
In pure .css file cause it is external, no javascript or [if lte IE 7] 
works in this case :(

Regards Pelle

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-20 Thread francky
Pelle wrote:
> Hi all.
>
> I have this in my CSS
> * html .clearing {display:none;}
>
> i NEED this to imp+lement in IE7 too, but NOT in Ffx or so.
> What is the bug code for this?
> In pure .css file cause it is external, no javascript or [if lte IE 7] 
> works in this case :(
>
> Regards Pelle
>
>   
Hi Pelle,
Did you try:

.clearing {
 display: block !important; 
 display: none;
 }

Don't know what IE7 will play with that...

But: *why* the clearing has to be canceled for IE?
If you have a testpage to see, maybe somebody can suggest a workaround.

Greetings,
francky
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-22 Thread Mark Story
The selector I've been using with quite a bit of success is

*:first-child+html
so in your circumstance it would be

*:first-child+html .clearing {

This selector uses the invisible super parent object above html that 
only IE has, it then uses CSS2 selectors to target the HTML object 
something that IE6 cannot do. This selector is completely ignored by 
other browsers as they don't have an element above html.

-Mark

Pelle wrote:
> Hi all.
>
> I have this in my CSS
> * html .clearing {display:none;}
>
> i NEED this to imp+lement in IE7 too, but NOT in Ffx or so.
> What is the bug code for this?
> In pure .css file cause it is external, no javascript or [if lte IE 7] 
> works in this case :(
>
> Regards Pelle
>   

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Chris Ovenden
TO filter the other way you can use something like
.clearing { display:none } /* IE 6 & 7 */
*|html .clearing { display:block } /* everything else */

Chris

On 3/22/07, Mark Story <[EMAIL PROTECTED]> wrote:
> The selector I've been using with quite a bit of success is
>
> *:first-child+html
> so in your circumstance it would be
>
> *:first-child+html .clearing {
>
> This selector uses the invisible super parent object above html that
> only IE has, it then uses CSS2 selectors to target the HTML object
> something that IE6 cannot do. This selector is completely ignored by
> other browsers as they don't have an element above html.
>
> -Mark
>
> Pelle wrote:
> > Hi all.
> >
> > I have this in my CSS
> > * html .clearing {display:none;}
> >
> > i NEED this to imp+lement in IE7 too, but NOT in Ffx or so.
> > What is the bug code for this?
> > In pure .css file cause it is external, no javascript or [if lte IE 7]
> > works in this case :(
> >
> > Regards Pelle
> >
>
> __
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>


-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Barney Carroll
Wow! I've been under the false supposition that IE7 did not 'believe' in 
the nameless super-html object.

How is it, then, that this works while the simple '* html' selector does 
not?


Regards,
Barney


Mark Story wrote:
> The selector I've been using with quite a bit of success is
> 
> *:first-child+html
> so in your circumstance it would be
> 
> *:first-child+html .clearing {
> 
> This selector uses the invisible super parent object above html that 
> only IE has, it then uses CSS2 selectors to target the HTML object 
> something that IE6 cannot do. This selector is completely ignored by 
> other browsers as they don't have an element above html.
> 
> -Mark
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Alex Robinson
At 11:34 + 23/3/07, Barney Carroll wrote:
>Wow! I've been under the false supposition that IE7 did not 'believe' in
>the nameless super-html object.
>
>How is it, then, that this works while the simple '* html' selector does
>not?


Because while Microsoft fixed * html they introduced another parsing bug :)

Actually you don't need the :first-child since *+html shouldn't 
select anything and doesn't in other modern browsers. It's just IE7 
that does it.

The only drawback is that if you want to target both IE7 and IE6 et 
al, you need to have a double declaration

* html { ... }
*+html { ... }


At 10:50 + 23/3/07, Chris Ovenden wrote:
>.clearing { display:none } /* IE 6 & 7 */
>*|html .clearing { display:block } /* everything else */

I think this is the first sighting of this beast in the wild

http://frontend.blogsome.com/2007/01/23/the-flispide-of-star-html/

Of course that's invalid in CSS2.1

It is valid CSS3 as far as I can tell...

http://www.w3.org/TR/css3-namespace/#css-qnames

... but the W3 vaildator claims that it's not which looks like a bug 
in the validator to me. Of course, trying to explain that to some 
clients may be tricky.

Moreover, you're also going to be targeting older browsers that don't 
understand the namespace selector either which may or may not be the 
result you're after.


And if we look at the list's very own wiki we find a page dedicated 
to IE7 which details even more ways to hack around IE7 including 
fuzzy specificity

http://css-discuss.incutio.com/?page=IE7


So, the choice is yours. Obviously though the best solution is to try 
and remove the need for the hacks in the first place.

For my own part I've been bumping into serious miscalculations of 
both em and percentage sized widths that all other browsers including 
IE6 and its oldr siblings handle just fine, but which IE7 gets 
hilariously and mysteriously wrong. This is though in pretty complex 
layouts and as yet I haven't had the time to roll up my sleeves and 
create reduced test cases to see just what is causing these 
miscalculations...
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Philippe Wittenbergh
Alex Robinson wrote:

> Because while Microsoft fixed * html they introduced another  
> parsing bug :)
>
> Actually you don't need the :first-child since *+html shouldn't
> select anything and doesn't in other modern browsers. It's just IE7
> that does it.
>
> The only drawback is that if you want to target both IE7 and IE6 et
> al, you need to have a double declaration
>
> * html { ... }
> *+html { ... }

MS fixed the mysterious 'super-root' element. But their support for  
those additional selectors in IE 7 reveals another bug, in that  
comments (and the DTD stuff at the top of the page is a SGML comment  
of sorts) are treated as elements, whereas they should be just  
nothing,  at parsing time.
(Probably because they have to support that barbarity that is a  
Conditional Comment).
Deconstructed:
*+html selects an element that immediately follows another one (any  
element), as in


(and IE 7 only support the adjacent sibling combinator in 'standards  
mode')

> At 10:50 + 23/3/07, Chris Ovenden wrote:
>> .clearing { display:none } /* IE 6 & 7 */
>> *|html .clearing { display:block } /* everything else */
>
> I think this is the first sighting of this beast in the wild
>
> http://frontend.blogsome.com/2007/01/23/the-flispide-of-star-html/
>
> Of course that's invalid in CSS2.1
>
> It is valid CSS3 as far as I can tell...
>
> http://www.w3.org/TR/css3-namespace/#css-qnames
>
> ... but the W3 vaildator claims that it's not which looks like a bug
> in the validator to me.

The CSS validator doesn't support namespaces, as far as I know.
Try validating this:

@namespace a url(http://www.example.com/a);

a|b


foo

Moreover, I don't think browsers should support namespace selectors  
in text/html documents. text/html is not namespace aware (browser do  
support them in practice).


Philippe
---
Philippe Wittenbergh





__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Barney Carroll
Alex Robinson wrote:
> ... but the W3 vaildator claims that it's not which looks like a bug in 
> the validator to me. Of course, trying to explain that to some clients 
> may be tricky.

Pity the one who finds themselves having to justify lack of css validity 
and can't... More so if it's actually significant in the client's eyes!


Regards,
Barney
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread david
Chris Ovenden wrote:
> TO filter the other way you can use something like
> .clearing { display:none } /* IE 6 & 7 */
> *|html .clearing { display:block } /* everything else */
> 
> Chris
> 
> On 3/22/07, Mark Story <[EMAIL PROTECTED]> wrote:
>> The selector I've been using with quite a bit of success is
>>
>> *:first-child+html
>> so in your circumstance it would be
>>
>> *:first-child+html .clearing {
>>
>> This selector uses the invisible super parent object above html that
>> only IE has, it then uses CSS2 selectors to target the HTML object
>> something that IE6 cannot do. This selector is completely ignored by
>> other browsers as they don't have an element above html.
>>
>> -Mark
>>
>> Pelle wrote:
>>> Hi all.
>>>
>>> I have this in my CSS
>>> * html .clearing {display:none;}
>>>
>>> i NEED this to imp+lement in IE7 too, but NOT in Ffx or so.
>>> What is the bug code for this?
>>> In pure .css file cause it is external, no javascript or [if lte IE 7]
>>> works in this case :(

Or avoid a bunch of hacks and just use conditional comments to feed IE7 
what it needs. I'm surprised no one has mentioned this yet!

-- 
David
[EMAIL PROTECTED]
authenticity, honesty, community
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread Barney Carroll
david wrote:
> Or avoid a bunch of hacks and just use conditional comments to feed IE7 
> what it needs. I'm surprised no one has mentioned this yet!

Quite refreshing, innit? I think it's because conditional comments 
aren't CSS.

Increasingly I find more people find it more important to maintain 
honestly valid HTML than CSS - as long as the markup is sparkling, the 
horrors underneath can twist and turn to accommodate whatever will eat them.


Regards,
Barney
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-23 Thread david
Barney Carroll wrote:
> david wrote:
>> Or avoid a bunch of hacks and just use conditional comments to feed IE7 
>> what it needs. I'm surprised no one has mentioned this yet!
> 
> Quite refreshing, innit? I think it's because conditional comments 
> aren't CSS.
> 
> Increasingly I find more people find it more important to maintain 
> honestly valid HTML than CSS - as long as the markup is sparkling, the 
> horrors underneath can twist and turn to accommodate whatever will eat them.

CSS is a powerful thing, but it is intended to work with valid HTML (as 
the W3C CSS validator reports). Clean, basic HTML avoids problems. And 
conditional comments don't interfere with that at all.

-- 
David
[EMAIL PROTECTED]
authenticity, honesty, community
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-26 Thread Chris Ovenden
On 3/23/07, david <[EMAIL PROTECTED]> wrote:
> Barney Carroll wrote:
> > david wrote:
> >> Or avoid a bunch of hacks and just use conditional comments to feed IE7
> >> what it needs. I'm surprised no one has mentioned this yet!
> >
> > Quite refreshing, innit? I think it's because conditional comments
> > aren't CSS.
> >
> > Increasingly I find more people find it more important to maintain
> > honestly valid HTML than CSS - as long as the markup is sparkling, the
> > horrors underneath can twist and turn to accommodate whatever will eat them.
>
> CSS is a powerful thing, but it is intended to work with valid HTML (as
> the W3C CSS validator reports). Clean, basic HTML avoids problems. And
> conditional comments don't interfere with that at all.
>

I think it's disingenuous to call conditional comments "clean, basic
HTML". We all want to do beautiful, cross-platform, futureproof page
layouts using semantic, accessible markup; unfortunately user agents
are currently not quite up to the job (and, much as I love it, I have
to include Firefox in this). So we hack; or, less pejoratively, we
work around known issues with the user agents we're given - counting
our blessings that we live in 2007 and not 1997. Whether we hack the
CSS, the HTML or a bit of both is a matter of personal choice
(personally I'm with Barney on this) - but call it what it is and
don't try to pretend to purity.

Chris

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-26 Thread Michael Geary
> > From: david
> > CSS is a powerful thing, but it is intended to work with
> > valid HTML (as the W3C CSS validator reports). Clean,
> > basic HTML avoids problems. And conditional comments
> > don't interfere with that at all.

> From: Chris Ovenden
> I think it's disingenuous to call conditional comments 
> "clean, basic HTML". We all want to do beautiful, 
> cross-platform, futureproof page layouts using semantic, 
> accessible markup; unfortunately user agents are currently 
> not quite up to the job (and, much as I love it, I have to 
> include Firefox in this). So we hack; or, less pejoratively, we
> work around known issues with the user agents we're given 
> - counting our blessings that we live in 2007 and not 1997. 
> Whether we hack the CSS, the HTML or a bit of both is a 
> matter of personal choice (personally I'm with Barney on 
> this) - but call it what it is and don't try to pretend to purity.

Very insightful!

At first I was taken aback by the word "disingenuous", until I realized you
probably didn't mean its usual connotation of cynical, calculating, and
insincere. :-)

It's not surprising that I'd be confused by a word where Dictionary.com
complains: "The meaning of disingenuous has been shifting about lately, as
if people were unsure of its proper meaning..."

http://dictionary.reference.com/search?q=disingenuous

-Mike (not the language police, just want to make sure no one takes offense
at something you didn't intend)

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] IE7 special code

2007-03-26 Thread Chris Ovenden
Michael Geary wrote:
> > From: Chris Ovenden
> > I think it's disingenuous to call conditional comments
> > "clean, basic HTML". We all want to do beautiful,
> > cross-platform, futureproof page layouts using semantic,
> > accessible markup; unfortunately user agents are currently
> > not quite up to the job (and, much as I love it, I have to
> > include Firefox in this). So we hack; or, less pejoratively, we
> > work around known issues with the user agents we're given
> > - counting our blessings that we live in 2007 and not 1997.
> > Whether we hack the CSS, the HTML or a bit of both is a
> > matter of personal choice (personally I'm with Barney on
> > this) - but call it what it is and don't try to pretend to purity.
>
> Very insightful!
>
> At first I was taken aback by the word "disingenuous", until I realized you
> probably didn't mean its usual connotation of cynical, calculating, and
> insincere. :-)
>
> It's not surprising that I'd be confused by a word where Dictionary.com
> complains: "The meaning of disingenuous has been shifting about lately, as
> if people were unsure of its proper meaning..."
>
> http://dictionary.reference.com/search?q=disingenuous
>
> -Mike (not the language police, just want to make sure no one takes offense
> at something you didn't intend)
>

Very interesting! I stand corrected in my use of the word, as I didn't
mean to imply that david's description of conditional comments was
either calcuating, naive or lacking in candour. Lacking in depth or
clarity, perhaps; overly-optimistic maybe. Can we just go with
"inaccurate"? ;-)

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/