zerowords zerowords - 1 year ago 50
HTML Question

display: inline-block does not produce horizontal result

This fiddle shows my problem.

The output include only 2 yellow boxes, but there could be more. I want the boxes to display horizontally, not vertically as they now display. I have attempted to use

display: inline-block
to accomplish my goal, but to no avail. How can I get the boxes to display horizontally?

Answer Source

add float: left to .sticky (and some margin left or/and right):