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

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 UTC