W3C home > Mailing lists > Public > public-css-testsuite@w3.org > September 2004

Hide the label with CSS

From: Marek Mazurek <mazurek@easynet.ro>
Date: Fri, 1 Oct 2004 00:18:21 +0400
Message-ID: <1824789126.20041001001821@easynet.ro>
To: public-css-testsuite@w3.org
How about hiding the label dynamically using javascript after the page has loaded?

The label would still be there for screen readers as they ignore scripts.

The markup would be identical to example 1 and the script would look something like:


var els=document.getElementsByTagName("label");

for(var i=0; (el=els[i]); i++) {

  if (el.className=="hide") {
    el.style.display="none";
  }

} 


thanx
http://www.fast-dir.com





Received on Thursday, 30 September 2004 19:20:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:54 GMT