I have a page with 7 divs as below;
<div id="container">
<div id="head"></div>
<div id="A">
<div id="A1">A1</div>
<div id="A2"></div>
</div>
<div id="B"></div>
<div id="foot"></div>
</div>
The styling is like below;
html, body {
margin: 0;
padding: 0;
border: 0;
}
#A, #B, #foot {
position: absolute;
}
#head{
background: #FF9900;
width: 100%;
height: 35px;
}
#A {
top: 35px;
width: 200px;
bottom: 35px;
background-color: #999999;
}
#A1{
height: 35px;
width: 35px;
margin-left: 200px;
background-color: #CC0066;
}
#B {
top: 35px;
left: 200px;
right: 0;
bottom: 35px;
background-color: #99CC00;
}
#foot{
background: #0066CC;
width: 100%;
height: 35px;
bottom: 0;
}
But my div A1 is not getting displayed. A working fiddle is here. I want to display div A1 above div B. How can I fix this??
Thanks in advance… :)
blasteralfred
Your #A1 div is being covered by you #B div. Add z-index:100; (or some other z-index number) to your #A div CSS. See example here http://jsfiddle.net/rGGEK/22/ .