表格内再内嵌表格,怎么让这些内嵌的表格自动换行
Jun 13, 2016 pm 01:14 PM
gt
lt
table
tr
width
表格内再内嵌表格,如何让这些内嵌的表格自动换行
我定义了大表格为700像素的宽度,内嵌每个小表格150宽度,每行显示四个小表格后换行
代码如下:
(结果是:表格不换行,把大表格撑破了)
- HTML code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> //PHP语句,从数据库select内容
Copy after login
|
------解决方案--------------------
1、在无 css 控制时,table 不会被平行放置。所以你的示例代码与问题描述不符
2、假定你已经做了控制,那么 4 个 table 只占 600,绝无超出 700 的可能。应该是你换行控制有问题
- HTML code
Copy after login
|
------解决方案--------------------
很明显楼主没有对表格进行换行控制。
三种方法供参考:
1,换用DIV(方便很多,但是弊端是,你得重新设计你的样式表)
2,用楼上那个左浮动(弊端是,内容向左,不能居中了)
3,用PHP程序控制:每取出四个值,填入4个表后,重新
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

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What are the differences between Huawei GT3 Pro and GT4?

Fix: Snipping tool not working in Windows 11

How to Fix Can't Connect to App Store Error on iPhone

What are the methods for expressing width value in css?
