View Full Version : CSS Div Container Width Problem

08-05-2010, 06:59 PM
Please see the code below.
In IE it all looks fine as the container neatly encloses the content.
However in Chrome and Firefox the container does not expand to the width of the content.

I would be really grateful if someone could modify the code below and post it here so that it works on all browsers!

I have made the container background black to make it really clear what the problem is.

Thanks in advance for any help!

<title>CSS Test</title>
width: auto;
padding: 30px;
border: 10px solid #ccc;
background: #000000;

<div id='container'>
<table border=1 width=2000><tr><td>This is a test</td></tr></table>

08-05-2010, 07:17 PM
displays for me, albeit my resolution is only 1680x1050 so the table extends past it

what exactly are you trying to do