Which is better for left-to-right layout: float or display:inline?
问题 I have some icons inside divs and needed to lay them out with a left-to-right structure instead of the default top-to-bottom layout that seems to come with divs. It's probably not news to most people who know CSS but I figured out (with a little help) that I could cause the divs to layout left-to-right using either: float: left/right or display:inline. My question is - is one preferable over the other ? <div id="icons"> <div id="divtxt" class="divicon"> <img src="/icons/text.png" id="icontxt"