表格布局?为什么不呢?

发布于 2024-09-30 09:02:48 字数 445 浏览 0 评论 0原文

可能的重复:
为什么不在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆流年 2024-10-07 09:02:48

如果您知道自己在做什么,那么在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文