Let's say I have the following <ul>for use in a responsive design:
li {
display: inline;
padding-right: 1em;
}
<ul>
<li>
MenuItemHeinz
</li>
<li>
MenuItemHinrich
</li>
<li>
MenuItemRoffen
</li>
<li>
MenuItemStaffRoffeltack
</li>
<li>
MenuItemHeinz
</li>
</ul>
Run codeHide resultWhen I resize my browser window or view a page on my phone, it breaks as follows:

How can I make menu items if they break beautifully on the grid, for example, like this? It is preferable to use only css ... of course;)

source
share