Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When rewriting the html is allowed, you can nest <code>&lt;ul&gt;</code>s within the <code>&lt;ul&gt;</code> and just let the inner <code>&lt;li&gt;</code>s display as inline-block. This would also semantically make sense IMHO, as the grouping also is reflected within the html.</p> <hr> <pre><code>&lt;ul&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;Item 1&lt;/li&gt; &lt;li&gt;Item 2&lt;/li&gt; &lt;li&gt;Item 3&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;Item 4&lt;/li&gt; &lt;li&gt;Item 5&lt;/li&gt; &lt;li&gt;Item 6&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <hr> <pre><code>li li { display:inline-block; } </code></pre> <hr> <h2>Demo</h2> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() { $('img').attr('src', 'http://phrogz.net/tmp/alphaball.png'); });</code></pre> <pre class="snippet-code-css lang-css prettyprint-override"><code>h3 { border-bottom: 1px solid #ccc; font-family: sans-serif; font-weight: bold; } ul { margin: 0.5em auto; list-style-type: none; } li li { text-align: center; display: inline-block; padding: 0.1em 1em; } img { width: 64px; display: block; margin: 0 auto; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;h3&gt;Features&lt;/h3&gt; &lt;ul&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;&lt;img /&gt;Smells Good&lt;/li&gt; &lt;li&gt;&lt;img /&gt;Tastes Great&lt;/li&gt; &lt;li&gt;&lt;img /&gt;Delicious&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;&lt;img /&gt;Wholesome&lt;/li&gt; &lt;li&gt;&lt;img /&gt;Eats Children&lt;/li&gt; &lt;li&gt;&lt;img /&gt;Yo' Mama&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre> </div> </div> </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload