If you were programming a calendar in HTML would you use Table tags or Div tags?(如果你用 HTML 编写日历,你会使用 Table 标签还是 Div 标签?)
问题描述
我将公司的日历转换为 XSL,并将所有表格更改为 div.它工作得很好,但由于不稳定的跨浏览器间距问题,我最初有很多 8 天的错误需要解决.但我正在阅读另一篇关于何时使用表格与 div 的文章,并且共识似乎是你应该只使用 div 来真正划分网页的各个部分,并且只使用表格来处理表格数据.
I converted my company's calendar to XSL and changed all the tables to divs. It worked pretty well, but I had a lot of 8 day week bugs to work out initially owing to precarious cross-browser spacing issues. But I was reading another post regarding when to use tables v. divs and the consensus seemed to be that you should only use divs for true divisions between parts of the webpage, and only use tables for tabular data.
我不确定我什至可以在 XSL 中使用表格,但我想跟进关于 Div 和表格的讨论,讨论制作网络日历的理想方式,也许是两者的结合.
I'm not sure I could even have used tables with XSL but I wanted to follow up that discussion of Divs and Tables with a discussion of the ideal way to make a web calendars and maybe a union of the two.
推荐答案
日历是使用表格的完美理由!日历固有地呈现表格数据,而 HTML 表格擅长呈现表格数据.HTML 表格标记提供了将 CSS 选择器与表格的各个部分相关联以修饰表格所需的几乎所有 CSS 钩子.
A calendar is the perfect reason to use a table! Calendars inherently present tabular data and HTML tables are good at presenting tabular data. And HTML table markup provides nearly all the CSS hooks you need to associate CSS selectors with various parts of the table to dress it up.
我完全赞成使用 DIV 进行布局——但坚持使用表格来处理表格数据.
I'm all for using DIVs for layout--but stick with tables for tabular data.
这是一篇关于如何使用 CSS 修饰表格的很酷的文章:http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs
Here is a cool article on how to dress up tables with CSS: http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs
这篇关于如果你用 HTML 编写日历,你会使用 Table 标签还是 Div 标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如果你用 HTML 编写日历,你会使用 Table 标签还是


- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01