Reputation: 22408
I'm gonna create 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.
Upvotes: 1
Views: 485
Reputation: 12610
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>
Upvotes: 1
Reputation: 931
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;
}
Upvotes: 2