Please have a look at http://jsfiddle.net/RRkC7/
I have set the width of the enclosing DIV tag "c" exactly to the width of the child table t1. However, due to the horizontal scroll bar, the vertical scroll bar appears. Ideally since the width of "c" is exactly the same as "t1", the horizontal scroll should not appear.
And ideas on how to avoid this.
Please note, I can't hard code anything. The inner TABLE may increase in width when more content is added and when that happens I resize the container div tag.
I also want both the horizontal and vertical scrollbars appearing in cases where the width of the table exceeds a certain number.
Thanks, Arun
<div id="p" style="overflow:hidden">
<div id="c" style="overflow:auto">
<table id="t1">
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
<tr><td>testing_testing_testing</td><td>testing_testing_testing</td></tr>
</table>
</div> </div>