I need a CSS snippet for hiding a HTML <div class="my">
(with quite a lot of contents, including text and other divs), but still reserving space for it. Is there something better or faster than div.my{opacity:0;}
?
views:
71answers:
2
+7
A:
visibility:hidden;
This will hide the element from the page but retain it's place in the layout.
Jamie Dixon
2010-02-21 14:37:21
A:
use document.getElementById("my").style.display = "none"; do not user visibility it only hide element but in display it remove the space acquired by element.
Parth
2010-02-21 14:56:35
OP wants to preserve the space it occupies
David Caunt
2010-02-21 15:31:29