Consider this example HTML markup (link to jsFiddle):
<div style="float: right; width: 200px; height: 200px; background-color: red; margin: 0 20px 0 30px;">
Block 1
</div>
<div style="height: 100px; background-color: green;">Block 2</div>
When the first block is floated, the second block expands to full available width ignoring the width of block 1. How can we adjust the width of the second block so it maximizes the space next to block 1 but considering the left margin of block 1?
The desired result should resemble this, where I utilized display: flex
in the second block. However, due to aesthetic reasons, using display: flex
for the paragraph within the second block is not an option.
Note: My limitations involve only being able to alter the CSS properties of the second block as I am working on a wiki template.