Wrap text around a div (in the middle of text) using css

How can I wrap text around a div. Leaving a div in the middle of the text body using css?

Sketch:

text text text text 
text text text text 
text text text text 
text text text text 
+-------+ text text 
+       + text text 
+  div  + text text 
+       + text text 
+-------+ text text 
text text text text 
text text text text 
text text text text 
text text text text 

NOTE. From an HTML perspective, a div goes before the text.

<div></div> [... text...]
+5
source share
3 answers

The other answers are correct, since you will need to swim <div>(for example, div { float: left; margin: 10px 0 10px 10px; }however, keep in mind that in order to <div>appear in the middle of your content, it will be in the content itself.

float , <div> , . , , <div>, . <div>, .

+6

div. , div :

float:left;
margin:10px; //To leave a gap around the div
+3

you need to float property. Try this example below:

.youDiv {
float: left;
}
+2
source

All Articles