Since In CSS an element cannot be selected based on its children, I think the only way this can be achieved is by using javascript.
On Thu, Dec 2, 2010 at 3:30 PM, Philip Taylor (Webmaster, Ret'd) <p.tay...@rhul.ac.uk> wrote: > A CMS, over which I have no control, auto-generates a number > of the following blocks (with different values for the > "href"s, "background-images", and the textual content of > the innermost <A> element) : > > <div class="album_box"> > <a > href="http://www.photos.for-charity.org.uk/gallery/sandbox-3228" > class="album_thumb" style="background-image: > url(http://www.photos.for-charity.org.uk/images/sites/1180/gallery/thumb/12909805624103.jpg);"></a> > <div class="album_title"><a > href="http://www.photos.for-charity.org.uk/gallery/sandbox-3228">Sandbox</a></div> > > <div class="album_description"></div> > <div style="clear:both;"></div> > </div> > > Can anyone think how I might code a CSS rule for DIV.album_box > that will set visibility: none for the entire DIV if it matches > the pattern given above ? (That is, if the value of the first > "href" attribute is > "http://www.photos.for-charity.org.uk/gallery/sandbox-3228", > the first style attribute is "background-image: > url(http://www.photos.for-charity.org.uk/images/sites/1180/gallery/thumb/12909805624103.jpg);", > the "href" of the inner <A> element is > "http://www.photos.for-charity.org.uk/gallery/sandbox-3228", > or the textual content of the inner <A> element is "Sandbox" ? > > Any one of these would suffice to determine that this DIV should > not be displayed; it is not necessary that all match, so whichever > is easiest to test for would be fine. > > Philip Taylor > > > > ______________________________________________________________________ > css-discuss [cs...@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/