php displays data in two rows

巴扎黑
Release: 2023-03-02 16:24:02
Original
1571 people have browsed it

It is recommended to use CSS processing for arranged display, which is not within the scope of PHP program logic. For example, your current program logic indicates that 7 pieces of data are displayed in a row. Suppose

your HTML code is as follows: 111... 777 You can modify $pagesize=7; so that He displays 14 items and then uses CSS to make each LI element float:left; and then specifies the maximum width of each LI element so that each row can only accommodate two columns, so that

can achieve 14 The data is displayed in two columns. To modify the layout in the future, you only need to modify the CSS. Remember, never try to replace things at the page presentation layer with program logic, use HTML and CSS

Related labels:
php
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!