.d1 {
height: 10px;
}
.dd {
display: inline-block;
overflow: hidden;
}
.dd1 {
display: inline-block;
}
<div class="d1">
<div class="dd"></div>
<div class="dd1"></div>
</div>
To adjust the layout so that the dd
and dd1
elements are on the same line, remove the overflow property. However, note that if you set the two divs to have different heights, they will not be equal in height.