Home >Web Front-end >CSS Tutorial >Can HTML/CSS Wrap Text Around an Image?
Wrap Text Around Image with HTML/CSS
Problem:
Designing a text block that wraps around an image like the following:
[Image of text wrapping around an image]
Query:
Is this possible with HTML/CSS?
Solution:
Float the image container using the following code:
<div>
CSS:
#container{ width: 400px; background: yellow; } #floated{ float: left; width: 150px; background: red; }
Example:
[Link to JSFiddle demo]
The above is the detailed content of Can HTML/CSS Wrap Text Around an Image?. For more information, please follow other related articles on the PHP Chinese website!