I have two boxes, title and content. I am using box-shadow on these to make them more good looking. Right now, both shadows are visible one on top of the other. But i want the title shadow not to float over the content box.
If i add position: relative to the title box, the content shadow stops floating over the title (this is exactly what i want to do, but the other way around). However, trying the opposite doesn't work. Z-index also doesnt seem to be working.
Fiddle: http://jsfiddle.net/JR93S/24/
h2 {
width: 300px;
margin: 20px 0px 0px 20px;
padding: 5px 11px 5px 11px;
border-radius: 3px;
color: #333;
background-color: #CCF;
box-shadow: 0px 0px 10px 10px rgba(0,0,0,0.5);
}
div {
width: 300px;
height: 300px;
margin: 0px 0px 0px 20px;
padding: 10px 10px 10px 10px;
border: 1px solid #999;
border-radius: 3px;
box-shadow: 0px 0px 10px 10px rgba(0,0,0,0.5);
}
<h2>title</h2>
<div>some stuff here</div>
Any ideas? Thanks!