Page 1 of 1

div boxes on top of other div boxes

Posted: Sun May 18, 2003 7:46 pm
by nigma
Is that possible using relative possitioning?

Posted: Fri May 23, 2003 9:04 am
by Friday
define z-index

Posted: Fri May 23, 2003 9:37 am
by nigma
but how do I even get the box ontop of the other box in the first place while using relative positioning?

Posted: Fri May 23, 2003 9:51 am
by patrikG
use nested <div>-tags

Code: Select all

<div style="blabla" id="myDiv1">
<div style="blabla" id="myDiv2">
</div>
</div>
If you want to use layers on top of each other use z-index, as suggested above, and play with the visibility, if you need to.

Posted: Fri May 23, 2003 11:50 am
by nigma
If you look at my site (http://www.mc0.cjb.net) on the far right there is a bar with some options. Under that box are three absolutely positioned div boxes that are invisible. When one of the options on the far right bar is clicked it hides all the other divs that are under the far right bar except for the one that was clicked(such as login). It makes the one that was clicked visible.