Page 1 of 1

Hiding tables which contain specific cells

Posted: Sat Apr 19, 2008 12:54 am
by HK
Do you know how to hide specific elements in adblock for firefox based on what is inside them, rather than what is defines and surrounds them?

I want to hide any tables of certain name which contain cells of certain name.

To hide the cell, I'd use this:
#TD(class=cellname)

To hide the whole table regardless of contents, I'd use:
#TABLE(class=tablename)

To hide a cell of cellname only if it lay in a table of tablename I'd use:
##TABLE.tablename TD.cellname

However, I can't work out how to use hide the entire table based on whether it contained cellname. Any help? :?

Thanks

Posted: Sat Apr 19, 2008 1:29 am
by rick752
To my knowledge, you cannot delete an outer element by defining the contents of a nested element. I've never tried to do that before but I'm PRETTY sure that it can't be done.

Is this a site that you can give an example link?

Posted: Sat Apr 19, 2008 9:21 am
by HK
No, it's a private forum.

Posted: Sat Apr 19, 2008 2:06 pm
by rick752
Is there a way that you can define the table from another element that comes just BEFORE it instead? Most rules for css work from "north to south".

To my knowledge.. once a table is already allowed, it can't go back and remove it because of something defined in a nested td.