I have the following code, after apply margin-top
to one of the divs eg. #two
, all divs have margin-top: 20px
.
Does relative margin-top
apply to all siblings if one of divs defined?
.item {
position: relative;
display: inline-block;
}
#two {
margin-top: 20px;
}
<div class='block'>
<div class='item'>One</div>
<div class='item' id='two'>Two</div>
<div class='item'>Three</div>
<div class='item'>Four</div>
</div>