here에서 WebKit (Safari 5, Chrome 10.0.648.205) 및 Mozilla (FF 4)는 모두 브라우저 창의 보이는 너비에 DIV div를 유지하면서 TABLE은 그 내용만큼 넓습니다.DIV가 포함 된 것보다 넓은 표
나는 DIV가 TABLE만큼 넓어지기를 기대하지만, 브라우저마다 동작이 동일하기 때문에 이것이 버그가 아닌 기능이라고 생각됩니다.
DIV가 float : left, it does grow as wide as the table으로 설정되면 흥미롭게도.
설명이 있으십니까?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Wide Table</title>
<style>
#container {
background-color:blue;
/* float:left;*/
}
</style>
</head>
<body>
<div id="container">
<table >
<tr id="tr">
<td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td><td>Table Cell</td>
</tr>
</table>
</div>
</body>
</html>
귀하의 질문에 대한 답변을 내 질문! 플로트 "성장"은 제가 찾고 있던 것입니다. 디스플레이를 인라인 블록으로 설정하는 것도 효과적이며 궁극적으로 내가 정착 한 것입니다. – Chris