Setting the width of inline elements

SourceC picture SourceC · Sep 14, 2009 · Viewed 66.3k times · Source

You can set the width of inline elements like <span>, <em> and <strong>, but you won’t notice any effect until you position them.

a) I thought the width of inline an inline element can’t be set?

b) Assuming width can be set - we won’t notice any effects ( thus the width we specify ) until we position inline element. Position how/where?

c) Why is the width of inline elements apparent only when we “position” them?

Answer

charliepark picture charliepark · Sep 14, 2009

There's also the option of display: inline-block, which might give you the best of both worlds.