height div does not size with content code example Example: div not larger than its content The solution is to set your div to display: inline-block.