2 replies [Last post]
iondisc
Offline
newbie
Last seen: 16 years 11 weeks ago
Timezone: GMT-7
Joined: 2004-11-13
Posts: 2
Points: 0

:?: Is there a way to select an elements' parent, in order to apply style to the parent?

Example:

I want to select all TD elements with a child A that has a class of "Selected".

Thanks in advance!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 days 11 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Parent Element Selection

Hi iondisc,
You may have to use the DOM to get the parent elements.
This might help: http://www.mozilla.org/docs/dom/domref/[/code]

iondisc
Offline
newbie
Last seen: 16 years 11 weeks ago
Timezone: GMT-7
Joined: 2004-11-13
Posts: 2
Points: 0

Parent Element Selection

Tony wrote:
Hi iondisc,
You may have to use the DOM to get the parent elements.
This might help: http://www.mozilla.org/docs/dom/domref/[/code]

I'm trying to do this all in the .css file. Can you access the DOM within CSS or only in Javascript/DHTML?