W3C home > Mailing lists > Public > www-style@w3.org > June 2006

Re: display: none

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 04 Jun 2006 17:30:14 +0200
To: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Cc: www-style@w3.org
Message-ID: <qqu582tbt0v1bphur2p9eec329lei33gdj@hive.bjoern.hoehrmann.de>

* Jonathan Chetwynd wrote:
>how can I view only those elements marked h4?

There is no good way to do this using CSS, as visibility is insufficient
you would have to set display:none for all elements that have no h4 de-
scendants, visibility:hidden for h4 ancestors and visibility:visible for
the h4 elements. Since you cannot select e.g. all elements that do not
have a h4 descendant using CSS Selectors, you would need something else.

You could of course try some yet more complicated tricks, but you'd be
better of using script or XSLT to transform the document as desired.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 4 June 2006 15:30:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:24 UTC