I have a page with a column of floating images on the left, and some paragraphs and other elements on the right. What I would like is for each element on the right side to remain consistently within a single column regardless of how the floating images fall on the page.
Here's what I have so far:
.parent {
border: 1px solid green;
}
.images {
float: left;
border: 1px solid blue;
}
.content {
border: 1px solid red;
}
.content:before {
content: '';
display: inline-block;
width: 200px;
height: 0;
}
.image-ul {
list-style-type: none;
padding: 0;
margin-right: 15px;
}
li {
list-style-position: inside;
}
<div class="parent">
<div class="images">
<ul class="image-ul">
<li><img src="https://i.imgur.com/kGKLgnu.png"/>
</li>
<li><img src="https://i.imgur.com/kGKLgnu.png"/>
</li>
</ul>
</div>
<div class="content">
<p>This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text.</p>
<p>This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text. This is a paragraph of text.</p>
<ul>
<li>This is a list of items.</li>
<li>This is a list of items.</li>
<li>This is a list of items.</li>
<li>This is a list of items.</li>
<li>This is a list of items.</li>
<li>This is a list of items.</li>
</ul>
</div>
</div>
Note that depending on how the page is sized, the paragraph or list might be broken up around the images like this:
That's what I'm trying to avoid. I want each paragraph, list, block, or whatever that spills over the bottom of the images to remain in the single column and with the same width. The following element can then fill the document width, like this for example:
How could I do this?