Making a child wider than his parent without width
2 answers
You can set display:inline and white-space:nowrap to your #child , which will give you the results you want. The container will only be wider than the contents inside, and if necessary will exceed the width of the parent.
+8
Try using this CSS to avoid line breaks on all #child { white-space: nowrap; } #child { white-space: nowrap; } .
Information here: http://www.w3schools.com/cssref/pr_text_white-space.asp
+4