表是否被DIV替换? [英] Are tables replaced by DIVs?

查看:139
本文介绍了表是否被DIV替换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

在评论中引起了我的注意。根据 HTML 4.01规范 HTML文档中的表格


表不应纯粹用作布局文档内容的手段,因为这在呈现到非可视媒体时可能会出现问题。此外,当与图形一起使用时,这些表可以迫使用户水平滚动以查看在具有较大显示器的系统上设计的表。为了尽量减少这些问题,作者应该使用样式表来控制布局,



Possible Duplicate:
Why not use tables for layout in HTML?

I know everyone is all about DIV's and css and against tables now days, I have always used tables because they are so easy for me to visually see what I am doing while building, I am just now ventruing into the DIV world.

So my question are tables completely replaced by div's generally? I notice on the source of stackoverflow it is mostly DIV's but still uses tables as well, so I am guessing that tables must be used sometimes?

Below is an image of something I am trying to accomplish, most of it is coded but some of it is added in on photoshop, so far I have it all done in div's however what I have is only the background cells which are a list item and the photos, what I am missing from my code is all the text areas and it would be super easy for me to position the text areas within a table cell but since like 80% of the object is done with just css and divs I am not sure if I should just try to finsih it with just div's or if a table inside the comment div's would be the way to go.

I noticed on this page that the ansers are a table inside of a DIV

解决方案

To be semantically correct, tables should only used for tabular data and not for laying out a page.

David Dorward brought something to my attention in a comment. According to the HTML 4.01 Specification's section on Tables in HTML Documents:

Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

这篇关于表是否被DIV替换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆