我对 HTML 和 CSS 有点菜鸟。我想知道什么是最好的方法:
1) 在一个页面上以正方形排列 4 个表格——即每个表格是一个象限,或者
2) 将 4 个表放在另一个表中。
如有任何建议,我们将不胜感激。
问候。
最佳答案
如果您想将页面拆分为 2X2 表格,最好的方法是使用 Divs(也更容易在 div 上应用 css)
<div style="width:auto;">
<div style="float:left; width:50%">
x-1,y-1
</div>
<div style="float:left; width:50%">
x-2,y-1
</div>
<div style="clear:both"></div>
</div>
<div style="width:auto;">
<div style="float:left; width:50%">
x-1,y-2
</div>
<div style="float:left; width:50%">
x-2,y-2
</div>
<div style="clear:both"></div>
</div>
http://css-discuss.incutio.com/wiki/Why_I_think_divs_are_better_than_tables
关于表中的 HTML 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10916094/