I am in possession of the following HTML code:
<div id="wrapper">
<div class="inline-block"></div>
<div class="inline-block"></div>
<div class="inline-block"></div>
<div class="block"></div>
</div>
Currently, the inline elements are styled with display: inline-block
. I require them to be aligned vertically. On the other hand, the block element has a style of display: block
.
As shown in the image below, this displays (first image):
When attempting to set the pink element (block) to float: right
, it causes the other elements to shift to the left, resulting in a margin on the right that corresponds to the width of the block element. Any suggestions?