Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are many ways to achieve your goal, all depends on how you want to present the information: ordered, unordered, columns organized by height, columns organized by width, etc..</p> <p>So, for starting point, you can do something along this lines:</p> <p><strong>HTML</strong></p> <pre><code>&lt;div&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#" style="font-size:18px;"&gt; &lt;img src="path_to_image.png" height="32px" width="32px"&gt; Name &lt;/a&gt; &lt;/li&gt; ... &lt;li&gt; &lt;a href="#" style="font-size:18px;"&gt; &lt;img src="path_to_image.png" height="32px" width="32px"&gt; Name &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;br&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>/* what you need to pay attention to */ ul { list-style-type: none; width: 330px; } li { margin: 0; padding: 2px 10px 2px 0; width: 100px; float: left; } /* some styles to links */ a { text-decoration: none; color: #333; } /* clear float */ br { clear: left; } </code></pre> <p>What this does is set a fixed width to the <code>LI</code> element, and floating it to the left, so as long as they fit side by side, the columns keep piling up.</p> <p><code>UL</code> width limits the number of columns that you desire!</p> <p>See the Fiddle <a href="http://jsfiddle.net/zuul/FwtdJ/" rel="nofollow noreferrer">example here!</a></p> <p><img src="https://i.stack.imgur.com/Gg2rb.jpg" alt="enter image description here"></p> <hr> <p><strong>Now, if you intend to prevent the vertical scrolling from ever appearing</strong>, you need to go with an extra css line:</p> <p>CSS</p> <pre><code>ul { height: 100px; } </code></pre> <p>What this does is to limit the height of the list wrap, thus forcing the items to keep on going to the left. Take not that you should remove the <code>width</code> from that <code>UL</code> to allow the columns to keep piling up to the left.</p> <p>See the <a href="http://jsfiddle.net/zuul/FwtdJ/7/" rel="nofollow noreferrer">Fiddle here!</a></p> <p><img src="https://i.stack.imgur.com/UDh2z.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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