I have a div that will be in. Now I want this div have its width set automatically to the width of the table inside it.
For instance:
<div> <table> <tr> <td>Hello</td> <td>World</td> </tr> <tr> <td>Sample</td> <td>Table</td> </tr> </table> </div>
I tried to set the float: left; property to it float: left; . It works, but then it creates another problem. Whatever content is delivered after this div is placed to the right of it in empty space.
What should be done?
source share