En el ejemplo siguiente, también disponible here, tanto WebKit (Safari 5, Chrome 10.0.648.205) como Mozilla (FF 4) mantienen DIV div alrededor del ancho visible de la ventana del navegador, mientras que TABLE es tan amplio como su contenido.TABLA más ancha que la DIV
Esperaría que el DIV crezca tan ancho como el TABLE, pero como el comportamiento es constante en todos los navegadores, sospecho que es una característica en lugar de un error.
Curiosamente, si el DIV está configurado para tener flotante: izquierda, it does grow as wide as the table.
¿Alguna explicación?
<!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>
Tu pregunta ha respondido a mi pregunta! El "crecimiento" flotante es lo que estaba buscando. Configurar la pantalla en el bloque en línea también funciona, y es en lo que finalmente me decidí. – Chris