Answers for "div size automatically size of content"

CSS
2

div not larger than its content

The solution is to set your div to display: inline-block.
Posted by: Guest on July-06-2020
0

make div' width expand with content

<div id="container">
  <p>Sample Text 1</p>
  <p>Sample Text 2dddddddddd</p>
  <p>Sample Text 3</p>
</div>
Posted by: Guest on June-11-2021

Browse Popular Code Answers by Language