How can I make a <img>
break text from within a limited% width%?
For example, with this code:
<style>
#imagem {
float:left;
}
#container {
width:250px;
background:#ccc;
}
</style>
<div id="container">
<img id="imagem" src="stack.png" width="150" />
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Quisque molestie justo et hendrerit molestie.
</div>
I have this result:
wherewordsfillthehorizontalspaceleftby<div>
.
WhatIamtryingtodoistohavea%ofthesamewidthas<img>
fitinthemiddleofthe2ndand3rdline,causingthetexttodivide.Iwantedthiscode:
<divid="container">
<img id="imagem" src="stack.png" width="250" />
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Quisque molestie justo et hendrerit molestie.
</div>
would produce this result:
I wanted the image to come right after the second line. This text comes from a field in the database, so it comes, whole. I wanted an alternative that did not need the programming language to break the text into parts.