How can I make a div not larger than its contents?

The solution is to set your div to display: inline-block.

Leave a Comment