Click to See Complete Forum and Search --> : [RESOLVED] JavaScript hide/show
I wanted to list a few song lyrics, but the problem is when the lyrics are 'hidden' they still take up room on the page, so other lyric titles are pushed way down on the page. Any idea how to fix this?
http://www.ninty.xenweb.net/weirdal/
dougal85
12-06-2006, 06:40 PM
Hmm, seems like it could get quickly complicated.
I guess you need to change the div height and overflow property in css... can you do that via JS? I'm not that sure.
The only way I know how to do it is via some AJAX. However, thats where it starts to get quickly more complicated. but having said that, you could achive this very easily with XAJAX (http://www.xajaxproject.org/)
Weedpacket
12-06-2006, 07:06 PM
From the CSS2 specification (http://www.w3.org/TR/REC-CSS2/visufx.html#visibility):
The 'visibility (http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-visibility)' property specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the 'display (http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-display)' property to 'none' to suppress box generation altogether).
From the CSS2 specification (http://www.w3.org/TR/REC-CSS2/visufx.html#visibility):
Thanks, that worked :)
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.