Div inside div experiments

by Ivan Gerasimenko

HTML

<div>
    <img src="http://s5.favim.com/orig/52/winter-nature-small-canon-eos-7d-Favim.com-474348.jpg" style="width: 150px; height: auto" />
</div>
<h4>With Title</h4>
<div class="wrapper-title">
    <span>Nunc viverra imperdiet enim.</span>
    <img src="http://s5.favim.com/orig/52/winter-nature-small-canon-eos-7d-Favim.com-474348.jpg" />
</div>
<h4>Crossed</h4>

CSS

img {
    width: inherit;
    height: auto;
}

/* With Title */
.wrapper-title {
    width: 50%;
    position: relative;
}
.wrapper-title > span {
    display: block;
    position: absolute;
    width: inherit;
    background: rgba(255, 255, 255, 0.5);
    font-size: 0.7em;
    text-align: center;
    line-height: 1.3em;
}