display:inline-block is supposed to shrink a div horizontally to no more than the space required to display the div, but when the div is multiline, then the div expands horizontally to 100%, resulting in some padding at the end of the lines. How can I get the div to shrink to the end of the longest line?
div {display:inline-block; background:lightblue; border:1px solid red}
<div>
When in the course of human events it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.
</div>