看板 Web_Design 關於我們 聯絡資訊
在傳統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)
LPH66:在table上用height=100%? 06/10 11:24
tomex:沒用呀! 不管在那一階用100%,它就是絕對的100%,而非剩餘 06/10 14:18
weipuyan:<table style="height:100%"> 06/11 03:03