I have a list of div displayed on the same line. When the page is not wide enough to display all the div on the same line, I don’t want extra div to be displayed on the next line. How can I avoid displaying extra div on a new line?
Here is a jsFiddle: http://jsfiddle.net/YCFZM/
Try to reduce width on the page and you’ll see some div displayed on a new line.
Thanks.
Updated gist with solution: http://jsfiddle.net/Meligy/YCFZM/16/
Main changes:
id=""sidebar"which was breaking the gistheight: 0px;fromdiv#sidebarCSSwhite-space:nowrap;todiv#sidebarCSSfloat:leftfromdiv.sidebar-itemCSSwhite-space: nowrap; display:inline-block;todiv.sidebar-itemCSSOptionally you can also remove
text-align:center;fromdiv#sidebarCSS if you meant to make the text be to the left.