Remember how we saw we can float things? display: inline-block
gives us another way to achieve similar results -- but with inline-block
, the contents are not taken out of the calculation of the parent container!
Compare the two JSFiddle examples of li
:
Copyright © David Heitmeyer