I am trying to create a div that has rounded corners that contains a div and text. I am having problems trying to get my rounded corners to show as it seems the overflow:hidden;
is not working.
I was reading this post that explained that both the image and parent div needs position:static;
but once I do that .text does not appear above the image.
HTML:
<div class="span8 cell">
<img src="http://www.placehold.it/400x200">
<div class="text">text</div>
</div>
CSS:
.cell {
width: 400px;
height: 100%;
overflow: hidden;
border-top-left-radius:5px 5px;
border-top-right-radius:5px 5px;
border-bottom-left-radius:5px 5px;
border-bottom-right-radius:5px 5px;
-moz-box-shadow: 0 1px 3px #000;
-webkit-box-shadow: 0 1px 3px #000;
box-shadow: 0 1px 3px #000;
background: #e5e5e5;
position: relative;
margin: 30px;
}
.cell img { position: static; }
.cell .text{
height: 100%;
color: #fff;
font-weight: bold;
position: absolute;
top: 0;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
padding: 20px;
text-align: left;
}?