問題描述
我將公司的日歷轉換為 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 標簽?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!