From: Ben C on
On 2008-05-07, darius <noone(a)here.invalid> wrote:
> Hi
>
> 1) Is it possible to select a parent. For ex, I want to apply a style to
> an anchor link that is wrapped around an image,
>
><a href="/"><img src ="home.gif" /></a>
>
> something like "a < img". Right now, I define an "a.img" class.

No. You can only select descendents and siblings (so therefore also
nephews and nieces), but not ancestors.

> 2) Viewing page source, I sometimes come across something like this
>
><div class="foo bar">
>
> What is that? It doesn't seem to be covered on http://www.w3.org/TR/REC-
> CSS2/selector.html

It just makes the div a member of two classes, foo and bar. .foo and
..bar should both match it.
From: Sherman Pendley on
darius <noone(a)here.invalid> writes:

> 2) Viewing page source, I sometimes come across something like this
>
> <div class="foo bar">
>
> What is that?

A div with two classes.

> It doesn't seem to be covered on http://www.w3.org/TR/REC-
> CSS2/selector.html

The class attribute above is HTML, not CSS:

<http://www.w3.org/TR/html401/struct/global.html#h-7.5.2>

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net