Home > Web Front-end > CSS Tutorial > Code to use CSS to solve the problem of text wrapping around images_Experience exchange

Code to use CSS to solve the problem of text wrapping around images_Experience exchange

PHP中文网
Release: 2016-05-16 12:06:45
Original
2150 people have browsed it


the picture above is a list of news titles with pictures and text produced by an artist for a website. it is laid out in a table. the upper and lower right parts are distributed in two cells. it is not easy to implement the program: either divide it into two query multiple times, fetch 4 items at a time, fetch 5 items at a time; or fetch 9 items at a time, and then display them in two cells. is it possible to set the image properties so that text and images can be aligned around each other like in word? in this way, the program does not need to pay attention to the picture, and is only responsible for reading and displaying it once. after testing, setting the float attribute of the image to left can solve our problem. the effect is as follows:


<div align="left"><img  src=/upload/20071208230527665.gif    style="max-width:90%"  style="max-width:90%" style="float:left;" / alt="Code to use CSS to solve the problem of text wrapping around images_Experience exchange" > 
·新闻标题列表<br> 
·新闻标题列表<br> 
·新闻标题列表<br> 
·新闻标题列表<br> 
·新闻标题列表新闻标题列表<br> 
·新闻标题列表新闻标题列表<br> 
·新闻标题列表新闻标题列表<br> 
·新闻标题列表新闻标题列表<br> 
·新闻标题列表新闻标题列表 
</div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template