Imagine you have an image positioned to the left using float:left;
, with text flowing around it.
The solution seems simple enough:
<img src="image.jpg" style="float:left">
<p style="outline: 1px dotted blue">Lorem ipsum...</p>
However, the challenge arises when trying to create an outline that wraps around only the text and not the image. A typical outline on the text results in this:
What we really want is this:
Applying display:inline;
to the <p>
tag creates an outline on each line of text instead of enclosing the entire block of text within a boundary.
We're open to creative CSS3 or hardcore CSS/JS solutions...