Re: inline vs inline-block

Le 03/05/2013 11:44, Niels Matthijs a écrit :
> Hey all,
>
> I know the difference between display:inline and display:inline-block,
> but I was wondering if there’s a good reason why someone would prefer
> inline over inline-block? The only reason that I can think of is if you
> want to hard-block top/bottom paddings/margins, but are there any other
> things that display:inline can handle which inline-block can’t?
>
> Or put differently, is there still a use-case for applying
> display:inline instead of inline-block (taking browser support out of
> the equation).

Hi,

`display: inline` boxes are important because they can be fragmented 
across multiple lines. inline-blocks are considered "atomic" and can not.

But you rarely need to write `display: inline` explicitly: it’s the 
initial value.

-- 
Simon Sapin

Received on Friday, 3 May 2013 10:02:56 UTC