Reputation: 96845
I have a list inside a div with text of varying lengths. How do I make the div's width hold all of that content. I've tried width: auto
(without actually knowing what would happen), but the div stretched out to the left of the window. Is there a property with which I can use to accomplish this?
Upvotes: 0
Views: 40
Reputation: 78710
If I'm understanding you correctly, you can use display: inline-block;
I'm taking you to mean that you want it to stretch to the content and not just go all the way to the end of the screen.
Upvotes: 1