W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: inline vs inline-block

From: Simon Sapin <simon.sapin@exyr.org>
Date: Fri, 03 May 2013 12:02:31 +0200
Message-ID: <51838B37.1000904@exyr.org>
To: www-style@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC