Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do inline list-items not wrap?

Tags:

css

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.

like image 969
PeeHaa Avatar asked Dec 17 '22 05:12

PeeHaa


1 Answers

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.

like image 87
Aaron Digulla Avatar answered Dec 28 '22 14:12

Aaron Digulla