W3C home > Mailing lists > Public > www-style@w3.org > July 2007

Re: Should 'display: none' be handled by 'visibility'?

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Fri, 27 Jul 2007 10:30:59 -0500
Message-ID: <46AA0FB3.6010507@mit.edu>
To: Markus Jonsson <carnaby@passagen.se>, www-style Mailing List <www-style@w3.org>

Markus Jonsson wrote:
> I'm not sure if this has been discussed before, but the display property has a minor problem. Often, {display: none} is used with dynamic 
> html, where an element could show or hide on demand. Hiding is easy

How exactly?  Presumably by adding a CSS rule, right?  Typically, inline style 
is used: element.style.display = "none".

> but once you need to reshow the element, you need to know the 
> appropriate display mode.

No, you just need to remove the rule you added. For example: 
element.style.display = "".

-Boris
Received on Friday, 27 July 2007 15:31:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:51 GMT