Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://jsfiddle.net/ZBgZ3/1/" rel="nofollow">Here is a working example.</a></p> <p>IMO, the solution depends om your needs. If are able to scale the images, then the 33% rule offered by others here is probably acceptable. However, you may wish to limit how far the size can be go (min-width). Also, this is going to totally bork your aspect ratios, which you might find unacceptable.</p> <p>One alternate solution would be to have a 'viewport' div on on-top of a larger div that allows some bleed-over to minimize the 'gosh, it's only one pixel only over' effect (where you get a huge, gaping blank column. This solution allows the cards to bleed out of the viewport a bit before forcing a new column. And it is CSS-only. This is the provided example. Test it out by changing the outer container width and height ('my-outer'):</p> <pre><code>/* CSS */ .my-outer { position : relative; box-sizing : border-box; width : 350px; height : 450px; border : 1px solid red; overflow-x : hidden; overflow-y : auto; } .my-inner { position : relative; box-sizing : border-box; border : 1px solid green; width : 120%; } .my-card { box-sizing : border-box; float : left; margin : 10px; width : 100px; height : 100px; font-size : 50px; line-height : 100px; text-align : center; font-weight : 800; background : #aaf; color : #fff; border-radius : 2x; box-shadow: 0 0 16px -2px #888; } &lt;!-- HTML --&gt; &lt;div class="my-outer"&gt; &lt;div class="my-inner"&gt; &lt;div class="my-card"&gt;1&lt;/div&gt; &lt;div class="my-card"&gt;2&lt;/div&gt; &lt;div class="my-card"&gt;3&lt;/div&gt; &lt;div class="my-card"&gt;4&lt;/div&gt; &lt;div class="my-card"&gt;5&lt;/div&gt; &lt;div class="my-card"&gt;6&lt;/div&gt; &lt;div class="my-card"&gt;7&lt;/div&gt; &lt;div class="my-card"&gt;8&lt;/div&gt; &lt;div class="my-card"&gt;9&lt;/div&gt; &lt;div class="my-card"&gt;10&lt;/div&gt; &lt;div class="my-card"&gt;11&lt;/div&gt; &lt;div class="my-card"&gt;12&lt;/div&gt; &lt;div class="my-card"&gt;13&lt;/div&gt; &lt;div class="my-card"&gt;14&lt;/div&gt; &lt;div stlye="clear : both;"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Another alternate solution, which would probably provide the best user experience, would be to resize the container in steps. This would require some JavaScript, but can be fairly easy to quite difficult to implement depending about the environment. And yes, I have done this sort of thing before ;)</p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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