Thursday, August 11, 2011

[XHTML] height in <td>

在XHTML文件中創建table時,
若你想在上建立height屬性,
你將遇上以上情況﹕



出現這情況的原因,
是這種寫法在XHTML (起碼在 XHTML 1.0 Transitional中是)並不規範,
比較好的做法是以CSS 定義的高度,
例如改成﹕
<td style="height:400px"></td>


(<---現在沒問題了)

===============English Version=============
When creating table in XHTML(At least in XHTML1.0 Transitional, it doesn't support "height" attribute in and tab.

Informal: <td heigth="400px"></td>
Solution:
You can use CSS to define height, here I use the inline style to correct it:
<td style="height:400px"></td>


============================================

No comments :

Post a Comment