[問題]XHTML的height=100%分配?

看板Web_Design作者 (tomex_ou)時間19年前 (2006/06/10 09:05), 編輯推噓3(300)
留言3則, 3人參與, 最新討論串1/1
在傳統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)

06/10 11:24, , 1F
在table上用height=100%?
06/10 11:24, 1F

06/10 14:18, , 2F
沒用呀! 不管在那一階用100%,它就是絕對的100%,而非剩餘
06/10 14:18, 2F

06/11 03:03, , 3F
<table style="height:100%">
06/11 03:03, 3F
文章代碼(AID): #14YXhr9a (Web_Design)
文章代碼(AID): #14YXhr9a (Web_Design)