PeeHaa
PeeHaa

Reputation: 72682

Why do inline list-items not wrap?

Please see the demo.

How come the li's do not wrap to the next line?

I'm not looking for a solution, because there are several and they work. But I'm wondering WHY it doesn't wrap.

Cannot find anything in the spec about it (or I don't see it).

This question is related to an answer I gave here.

Upvotes: 4

Views: 2156

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328754

There is no white space between them.

This sounds odd because the browser should be able to break between elements but you turned the elements into "words" using display: inline;. In this case, the browser "sees"

americaaustraliabannercabalcomputerfamilygeneralgwholsisraellastchaosmepeterpanphotospotbsPoTBSpsorforyzomtantratattoostemplatestravelweb_designwowmjboxquakeliveSpain_2011Sanatorio_de_Turberculososseverallsseveralls2bush_boake_allenodeon-colchestermoredartford

and it has no idea how to split this monster word.

Upvotes: 12

Related Questions