Can i make a container the size of the text inside without wrapping
css, html
Solution
Use the `white-space` CSS property:
li { white-space: nowrap; }
jsfiddle demo link
Problem
The best way to describe my problem is by viewing the js-fiddle i created: http://jsfiddle.net/tkY7p/ I would like the nested ul to become the size of the longest li inside, without the line wrapping, so it appears like: We are long and annoying rather then: We are long and annoying I'm already using jquery on the page so that solution is possible, but if it is possible to do it with css, this option is preferred. I don't think it's possible but I thought I would ask anyway Any responses are appreciated =]