看板 Web_Design 關於我們 聯絡資訊
雙DIV, 左邊div固定寬度, 右邊div寬度不固定,但是要滿版,而且不能因為東西過多而跑掉下面一格去 也就是表格的效果 想了很久,還是得不到結論=_= 請前輩們賜教 <style> #left { float:left; width:200px; height:500px; background-color:#FF0000; } #content { float:left; height:500px; background-color:#000066; } #contenter{ } </style> <div id="contenter"> <div id="left">l </div> <div id="content">這裡要怎麼滿版 </div> </div> 要怎麼修正才等於下面的結果 <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200">&nbsp;</td> <td>&nbsp;</td> </tr> </table> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.84.185.78
nosql:以前有用過一招 左邊float, 用200px寬 08/06 03:15
nosql:右邊用float 用margin-left 200px 08/06 03:15
nosql:下面再放一個 clear 08/06 03:16
arrack:可是這樣右邊不會滿版 08/06 03:23
arrack:是有特殊技巧嗎? 08/06 03:23
※ 編輯: arrack 來自: 219.84.185.78 (08/06 03:25)
nosql:詳細應該是 讓兩個物件全部都float 08/06 03:30
nosql:左邊指定寬度 右邊用邊界來假裝有那麼寬 08/06 03:30
nosql:最下面用一個clear:both把上面分開來 08/06 03:31
nosql:更詳細的 因為我個人板bbs掛掉就沒辦法惹_A_ 08/06 03:31
nosql:我是參考某個英文網頁的內容 08/06 03:31
nosql:該網址可以在維基百科使用之CSS找到 08/06 03:32
nosql:我想你可能是要弄類似wiki那樣的版面? 08/06 03:32