I am trying to create some margin between two divs when both of them have a common parent code, so the following code:
<div class="parent"> <div class="child">hello</div> <div class="child">hello</div> </div>
and css
.child{background:#ccc; padding:20px} .parent .child + .parent .child{ margin-top:520px; }
you can see at this link: http://jsfiddle.net/hjcY7/
And also in the link there is another example that it works, but when the div has no parent.
Any ideas?
Thanks!
source share