How can I make a div not larger than its contents?
Asked 07 September, 2021
Viewed 3K times
  • 50
Votes

I have a layout similar to:

<div>
    <table>
    </table>
</div>

I would like for the div to only expand to as wide as my table becomes.

30 Answer