View Full Version : hidding all page elements and lefting just one
LottaLava
03-13-2003, 09:15 PM
Hello again, iŽd like to know if is possible to hide every elements inside a body element and let just one span visible. is that possible?
With best wishes,
LottaLava:D
Tommi
03-13-2003, 09:20 PM
Put everything you want to hide into a <div> tag and access it's style property "visibitily"
document.getElementById('div_id').style.visibility = 'hidden';
document.getElementById('div_id').style.visibility = 'visible';
But be warned, these elements will consume space in you document, even when they are hidden. You can bypass this by another style-property: "display"
display = "none" - the element isn't there at all and won't eat any space
display = "inline" - tata! Here it is again...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.