Re: [WSG] Style a parent element based on an id selector of the child element

2005-09-15 Thread Christian Montoya
Can't you make the a fill the entire td? i think it's display:block? then the background of the link will look like it fills the table cell.

[WSG] Style a parent element based on an id selector of the child element

2005-09-14 Thread Martin Smales
Hello, are you able solve this dilemma for me? Is there a way to style the td element with a background colour if an a element has a active_menu id? table tr tda href="" id="active_menu"Link/a/td /tr/table Thanks,Martin

Re: [WSG] Style a parent element based on an id selector of the child element

2005-09-14 Thread Matthew Cruickshank
On Wed, 2005-09-14 at 16:56 +0800, Martin Smales wrote: Is there a way to style the td element with a background colour if an a element has a active_menu id? No, CSS Selectors don't allow this. They can only step down, not up. You could do the equivalent in JavaScript, or... well, a long term

Re: [WSG] Style a parent element based on an id selector of the child element

2005-09-14 Thread Martin Heiden
Martin, that's not possible all selectors work the other way around. You could assign a class or, if you don't need it for other things, the id to the td tag. If this isn't possible on the server side, use javascript to do so. regards, Martin am Mittwoch, 14. September 2005

RE: [WSG] Style a parent element based on an id selector of the child element

2005-09-14 Thread Scott Swabey - Lafinboy Productions
As Matthew said, the selectors step down, so you could apply the active_menu id to the td, then use descendence(!) on the contained elements. td id=active_menuasnip/a/td #active_menu { styles } #active_menu a { styles } Regards Scott Swabey Lafinboy Productions www.lafinboy.com

Re: [WSG] Style a parent element based on an id selector of the child element

2005-09-14 Thread Bert Doorn
G'day Is there a way to style the td element with a background colour if an a element has a active_menu id? As others have said, you;d need to resort to JavaScript to do this, or change the setup so the id is on the container you want to change. One thing though... Is this in a data