I have a table that has a variable width. Based on the size of the data in the columns, the table can range from say 650px to 840px. I have a DIV that surrounds this table. The intent of the div is to add a simple border around the table (and some other objects like a heading and some text).
How can I defined my DIV's width so that it is the size of the table, plus say 10px padding?
If I use width:auto or no width, the div is the size of the entire page. If I specify the exact width, then sometimes there is too much of a margin around the table.
Thanks!!
Start Free Trial