By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

Child selectors? I dont get it :(

P: n/a
I tried everything. I even tested it in combination with opera and mozilla.
(I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
</style>
</head>
<body>
<p>
hello
<span>why isnt this blue? </span>
hello
</p>
</body>
</html>
Thank you,
Tom
Jul 20 '05 #1
Share this Question
Share on Google+
18 Replies


P: n/a
"news.pandora.be" <tm***@hotmail.com> wrote:
I tried everything. I even tested it in combination with opera and mozilla.
(I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
</style>
</head>
<body>
<p>
hello
<span>why isnt this blue? </span>
hello
</p>
</body>
</html>


Works here (Opera), won't work in IE as it doesn't support child
selectors.

--
Spartanicus
Jul 20 '05 #2

P: n/a
Els


Spartanicus wrote:
"news.pandora.be" <tm***@hotmail.com> wrote:

I tried everything. I even tested it in combination with opera and mozilla.
(I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
</style>
</head>
<body>
<p>
hello
<span>why isnt this blue? </span>
hello
</p>
</body>
</html>

Works here (Opera), won't work in IE as it doesn't support child
selectors.


And if you were using it on purpose to hide it from IE, than
avoid the spaces around >, for IE5.0 will apply the style if
you leave spaces.
--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

Jul 20 '05 #3

P: n/a
On Sun, 22 Feb 2004 06:12:41 GMT, "news.pandora.be" <tm***@hotmail.com>
wrote:
I tried everything. I even tested it in combination with opera and mozilla.
(I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
</style>
</head>
<body>
<p>
hello
<span>why isnt this blue? </span>
hello
</p>
</body>
</html>


What version of Opera did you test? It's blue in Opera 6.05 and 7.23.
IE doesn't understand child selectors though. They've only been around
for about 6 years, and Microsoft can't react that fast.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #4

P: n/a
Stephen Poley wrote:
On Sun, 22 Feb 2004 06:12:41 GMT, "news.pandora.be" <tm***@hotmail.com>
wrote:

I tried everything. I even tested it in combination with opera and mozilla.
(I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
^
What version of Opera did you test? It's blue in Opera 6.05 and 7.23.
IE doesn't understand child selectors though. They've only been around
for about 6 years, and Microsoft can't react that fast.


Could it be it's just the ';' thats missing? (not tested)

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #5

P: n/a
Els wrote:

And if you were using it on purpose to hide it from IE, than avoid the
spaces around >, for IE5.0 will apply the style if you leave spaces.


Really? I never knew this. Now why on earth die M$ mess this up in the
release of IE6.0?

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #6

P: n/a
Els


Barbara de Zoete wrote:
Els wrote:

And if you were using it on purpose to hide it from IE, than avoid the
spaces around >, for IE5.0 will apply the style if you leave spaces.

Really? I never knew this. Now why on earth die M$ mess this up in the
release of IE6.0?


No, 5.5 already :-)
I think that IE5.0 doesn't really understand it, but fails
to see the >.
Then 5.5 saw it, but doesn't understand so doesn't apply,
idem for 6.0.
But that's just my thinking, as I'm not sure if IE 5.0
really gets the difference between just the child or another
descendant.
--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

Jul 20 '05 #7

P: n/a
In article Barbara de Zoete wrote:
Els wrote:

And if you were using it on purpose to hide it from IE, than avoid the
spaces around >, for IE5.0 will apply the style if you leave spaces.


Really? I never knew this. Now why on earth die M$ mess this up in the
release of IE6.0?


No, IE5 will interpret "foo > bar" like "foo bar" that is incorrect too.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #8

P: n/a
On Sun, 22 Feb 2004, Barbara de Zoete wrote:
Now why on earth [did] M$ mess this up


If we could answer *that* kind of question, we wouldn't be here on
usenet, I suspect. SCNR.
Jul 20 '05 #9

P: n/a
Lauri Raittila wrote:
Els wrote:
And if you were using it on purpose to hide it from IE, than
avoid the spaces around >, for IE5.0 will apply the style if you
leave spaces.


No, IE5 will interpret "foo > bar" like "foo bar" that is incorrect
too.


IE5/*Win* will interpret foo > bar as "foo bar"...

--
Brian (remove "invalid-remove" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

P: n/a
It seems "news.pandora.be" wrote in
comp.infosystems.www.authoring.stylesheets:
(I use IE 6 mostly)

Please tell me what is wrong


Some questions answer themselves. :-)

Seriously, IE has really dreadful CSS support. Child selectors don't
work at all, for instance.
This is one of the big frustrations about writing for the Web. There
is often a simple, straightforward, standard way to do something;
but because stoopid Microsoft doesn't support it we have to choose
between doing it a different (complex, obfuscated) way or having it
work only for the savvy minority of visitors.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #11

P: n/a
It seems "Barbara de Zoete" wrote in
comp.infosystems.www.authoring.stylesheets:
On Sun, 22 Feb 2004 06:12:41 GMT, "news.pandora.be" <tm***@hotmail.com>
wrote:
p > span { background-color: blue }

^
Could it be it's just the ';' thats missing? (not tested)


The semicolon is a separator, not a terminator. You don't need it
after the last property inside braces.

The real problem is much more straightforward (and annoying):
Microsoft simply doesn't support some standard selector forms
including this one.

http://www.blooberry.com/indexdot/cs...rs/element.htm

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #12

P: n/a
Stan Brown wrote:
(I use IE 6 mostly)

Please tell me what is wrong


Some questions answer themselves. :-)

Seriously, IE has really dreadful CSS support. Child selectors don't
work at all, for instance.


Can you blame anyone for using IE6 ? I mean what could we do ?
I really tried Netscape, which I couldn't believe it's free, but it has
drawbacks anacceptable for me :(

it has a horrible fullscreen mode, which it happens I use often to read
docs (it locks my autohide taskbar, the fullscreen is not really *full*
screen and it has no automenus and toolbar) and it has his own Favourites
(or bookmarks). Why doesn't it get also the Windows Explorer favourites ?

Sorry, I know this is off-topic
Jul 20 '05 #13

P: n/a
Stan Brown wrote:
(I use IE 6 mostly)

Please tell me what is wrong


Some questions answer themselves. :-)

Seriously, IE has really dreadful CSS support. Child selectors don't
work at all, for instance.


Can you blame anyone for using IE6 ? I mean what could we do ?
I really tried Netscape, which I couldn't believe it's free, but it has
drawbacks anacceptable for me :(

it has a horrible fullscreen mode, which it happens I use often to read
docs (it locks my autohide taskbar, the fullscreen is not really *full*
screen and it has no automenus and toolbar) and it has his own Favourites
(or bookmarks). Why doesn't it get also the Windows Explorer favourites ?

Sorry, I know this is off-topic
--
Thank you
Timothy Madden
---------------------------
And I don't wanna miss a thing
Jul 20 '05 #14

P: n/a
Timothy Madden wrote:

Can you blame anyone for using IE6 ?
Blame? no. But I wouldnt' recommend it.
Sorry, I know this is off-topic


Yes, it is. You might try asking about such things in a Netscape group.
I would have emailed you with more about Netscape, but I cannot figure
out if your email address is real or not. It looks fake. (If you want to
the response, email me, but remove "invalid" from the end of my email
address.)

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #15

P: n/a
Thx for all the replies guys. It seems this is a nice usenet group :)

IE just doesnt support child selectors. It's a shame that MS doenst make
this work.

I recommend Opera cause it has good css support and I use IE only if the
site doesnt support opera.
These sites are mostly owned by MS. Probably no coincidence.

Its free if you can live with the banner. Defenitly worth a try!
"news.pandora.be" <tm***@hotmail.com> wrote in message
news:tL******************@phobos.telenet-ops.be...
I tried everything. I even tested it in combination with opera and mozilla. (I use IE 6 mostly)
It's reduced to the simple example below.

Please tell me what is wrong with my understaning of child selectors! I
realy dont know :(

<html>
<head>
<style>
p > span { background-color: blue }
</style>
</head>
<body>
<p>
hello
<span>why isnt this blue? </span>
hello
</p>
</body>
</html>
Thank you,
Tom

Jul 20 '05 #16

P: n/a
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

Tom Pester wrote:

IE just doesnt support child selectors.
IE/*Win* doesn't support child selectors, you mean.
It's a shame that MS doenst make this work.
A shame, yes. But shoddy css support is the least of its sins.
I recommend Opera cause it has good css support
[...]
Its free if you can live with the banner. Defenitly worth a try!
You're preaching to the choir.
and I use IE only if the site doesnt support opera.
These sites are mostly owned by MS. Probably no coincidence.


That's what faked referrer headers are for.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17

P: n/a

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:koa_b.103162$uV3.584881@attbi_s51...
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

Tom Pester wrote:

IE just doesnt support child selectors.
IE/*Win* doesn't support child selectors, you mean.


So the mac version supports it? That doesnt help much :s
It's a shame that MS doenst make this work.


A shame, yes. But shoddy css support is the least of its sins.
I recommend Opera cause it has good css support
> [...]
> Its free if you can live with the banner. Defenitly worth a try!


You're preaching to the choir.
and I use IE only if the site doesnt support opera.
These sites are mostly owned by MS. Probably no coincidence.


That's what faked referrer headers are for.


I think you mean faking your "user agent"

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #18

P: n/a
Tom Pester wrote:
and I use IE only if the site doesnt support opera. These sites
are mostly owned by MS. Probably no coincidence.


That's what faked referrer headers are for.


I think you mean faking your "user agent"


Yep.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #19

This discussion thread is closed

Replies have been disabled for this discussion.