作者tomex (tomex_ou)
看板Web_Design
標題[問題]XHTML的height=100%分配?
時間Sat Jun 10 09:08:19 2006
在傳統html裏,當一個table內的<td>設為height=100%
代表它使用剩餘自動調配100%的高度。
但xhtml裏,這個height=100%造成一定是頁面的高度
而不是跟其他<td>分享高度
造成scroll bar一直拉個不停。
例如總頁面共600px:
<table>
<tr style="height:10px">
<td>up</td>
</tr>
<tr> //應該是590px,但up卻會平均高度! 只有用100%高度,但scroll bar出現
<td>down</td>
</tr>
</table>
請問我該怎麼讓height=100%是使用剩餘的高度呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.119.20.171
※ 編輯: tomex 來自: 140.119.20.171 (06/10 09:29)
1F:推 LPH66:在table上用height=100%? 06/10 11:24
2F:推 tomex:沒用呀! 不管在那一階用100%,它就是絕對的100%,而非剩餘 06/10 14:18
3F:推 weipuyan:<table style="height:100%"> 06/11 03:03