表格布局?为什么不呢?
可能的重复:
为什么不在 HTML 中使用表格进行布局?
为什么不使用表格布局?我不明白有什么大不了的。我的所有网站都使用 CMS,因此从一开始就将演示文稿与内容分开。
有些事情用表格更容易做到……比如等高的列。当然有很多技巧和窍门,但为什么要这么做呢?使用表格进行布局是错误的想法从何而来?来自在其网站上拥有数百个实际 .html 文档的人?噗噗。
说真的,如果有更好的理由不使用桌子(实际上是理智的原因,与非洲饥饿的孩子或盲人互联网用户无关),我想知道。因为我真的想制作三根等高的柱子,并且我不希望它花费超过 20 秒的时间。
Possible Duplicate:
Why not use tables for layout in HTML?
Why not use tables for layout? I don't see what's the big deal. All my sites use a CMS so presentation is separated from the content from the get go.
And some things are easier to do with tables... like columns of equal height. Sure there are plenty of hacks and tricks but why do it? Where did this idea that it's wrong to use tables for layout come from anyway? From someone who had hundreds of actual .html documents on his site? Pfffft.
Seriously, if there are better reasons not to use tables (actual sane reasons, not connected to hungry kids in Africa or blind Internet users), I'd like to know. Because I really want to make three columns of equal height and I don't want it to take longer than 20 seconds.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您知道自己在做什么,那么在 div 中完成布局的生成速度会快得多。此外,如果设计发生变化,它需要更少的代码,更干净,更具可读性并且更灵活。表格用于表格数据而不是布局。
我无意刻薄,但现在已经不是 2003 年了,你现在真的应该已经学习无表布局的基础知识了。
If you know what you are doing a layout done in divs is much quicker to produce. Additionally it requires less code, is cleaner, more readable, and more flexible should the design change. Tables are for tabular data not for layout.
I don't mean to be mean but it isn't 2003 anymore you really should have learned the basics of table-less layout by now.
为什么表格不好(对于布局)
为什么用于布局的表格很愚蠢
Why Tables Are Bad (For Layout)
Why tables for layout is stupid