比方說,我有以下佈局上的一些網頁:在CSS中處理這個簡單例子的好方法是什麼?
Title: Some Title
Author: Some Author
Author Date of Birth: Date of birth
注:
- 左側文字是右對齊和大膽。
- 用於多個不同的頁面。
- 右側可以包含某些點的輸入控件。
在這種情況下最合適的方法是什麼?我能想到的幾個選項(承擔外部樣式表應用CSS):
表
簡單,容易,但我不知道這會被認爲是一個很好的使用表。
<table>
<tr>
<td>Title</td>
<td>Some Title</td>
</tr>
</table>
DIV +類
我覺得這是divitis的情況和classitis集於一身。
<div class="information">
<div class="title">Title</div><div class="value">Some Title</div>
</div>
div容器
這感覺更像是在正確的道路,但我不知道。
<div class="information">
<strong>Title</strong> <span>Some Title</span>
</div>
建議?
表是在這種情況下,最好的做法。 –
@mcb實際上,由於屏幕閱讀器的兼容性,我認爲'table'是最差的。我更喜歡'div + classes'。 –
而不是表格,你也可以嘗試在你的情況下定義列表:http://www.maxdesign.com.au/articles/definition/ – Luwe