I have two images inside of a div
<div class="my_div">
<img src="1.jpg" />
<img src="2.jpg" />
</div>
I have tried following css
.my_div img:nth-child(2) { margin-top:130px; }
But this doesn't work? Any idea why?
I have two images inside of a div
<div class="my_div">
<img src="1.jpg" />
<img src="2.jpg" />
</div>
I have tried following css
.my_div img:nth-child(2) { margin-top:130px; }
But this doesn't work? Any idea why?
use display: inherit;
on .my_div img:nth-child(2)
.my_div img:nth-child(2) {
margin-top:130px;
display: inherit;
}
<div class="my_div">
<img src="1.jpg" />
<img src="2.jpg" />
</div>