javascript - Hide some divs (it won't take space) -


i have 5 divs. each time want 1 of them shown in middle of screen. problem hidden divs takes space. each div contain lot of information don't want create each time need show it.

i used: visibility="visible" or visibility="hidden".

are there other possibilities?

you need use display:none hide element layout instead, documented as:

none - value causes element not appear in document. has no effect on layout.

visibility:hidden leave invisible box, problem encountering. documentation:

hidden - generated box invisible (fully transparent, nothing drawn), still affects layout. furthermore, descendants of element visible if have 'visibility: visible'.

the default css display value <div> display:block, show <div> again, set element display:block. note there other values display, take care set it's original value (which might not default value).


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -