Arrangement Div tags like this?
I'm gonna cre开发者_运维知识库ate two div
tags with CSS
that appear in the page like below :
alt text http://xs.to/image-5E61_4B88C82D.jpg
Would you please guide me, how I should write the CSS codes?
Thanks.try this
#div-01
{
position :absolute;
top:0px;
left:0px;
height:600px;
width:800px;
background-color:gray;
}
#div-02
{
position :absolute;
top:0px;
left:200px;
height:500px;
width:400px;
background-color:yellow;
}
I suggest this
#div-01
{
z-index:1;
height:300px;
width:800px;
background-color:gray;
}
#div-02
{
z-index:2;
height:500px;
width:400px;
background-color:yellow;
}
<div id="div-01">
<div id="div-02"></div>
</div>
Update: Fixed For Two DIVs
Demonstration :)
Please see the source code...
精彩评论