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?
I have a list inside a div with text of varying lengths. How do
Share
If I’m understanding you correctly, you can use
display: inline-block;http://jsfiddle.net/H66TB/1/
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.