Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to change media queries
    primarykey
    data
    text
    <p>I have found some code but want to change the CSS to show only two boxes across the page at one time. </p> <p>Can some explain to me how to change the media queries css to show only two boxes when you change the screen size. </p> <p>i have made a fiddle to show my working . </p> <p><a href="http://jsfiddle.net/pbVLe/" rel="nofollow">http://jsfiddle.net/pbVLe/</a></p> <pre><code>#upload-container-two { width: 100%; max-width: 970px; margin: 0 auto; margin-top: 20px; } #upload-container-two ul { width: 100%; *zoom: 1; } #upload-container-two ul li { float: left; margin-right: -100%; width: 93%; } #upload-container-two ul li a:hover { text-decoration: none; } #upload-container-two ul li span { font-size: 16px; line-height: 22px; display: block; position: absolute; bottom: 13px; display: none; } #upload-container-two ul li img { width: 100%; } #upload-container-two ul li:nth-child(2n+0) { margin-left: 0%; margin-bottom: 5.85%; clear: both; overflow: hidden; *zoom: 1; } @media screen and (min-width: 460px) { #upload-container-two ul li { float: left; margin-right: -100%; width: 42.08%; } #upload-container-two ul li span { padding-bottom: 10px; } #upload-container-two ul li:nth-child(1n+1) { margin-left: 0%; margin-bottom: 3.85%; clear: both; overflow: hidden; *zoom: 1; } #upload-container-two ul li:nth-child(2n+2) { margin-left: 51.93%; margin-bottom: 3.85%; clear: none; } } @media screen and (min-width: 750px) { #upload-container-two ul li { float: left; margin-right: -100%; width: 27.73%; } #upload-container-two ul li span { padding-bottom: 10px; } #upload-container-two ul li:nth-child(2n+1) { margin-left: 0%; margin-bottom: 3.85%; clear: both; overflow: hidden; *zoom: 1; } #upload-container-two ul li:nth-child(2n+2) { margin-left: 34.29%; margin-bottom: 3.85%; clear: none; } #upload-container-two ul li:nth-child(2n+3) { margin-left: 68.59%; margin-bottom: 3.85%; clear: none; } } @media screen and (min-width: 900px) { #upload-container-two ul li { float: left; margin-right: -100%; width: 20.8%; } #upload-container-two ul li span { padding-bottom: 0px; } #upload-container-two ul li:nth-child(2n+1) { margin-left: 0%; margin-bottom: 3.85%; clear: both; overflow: hidden; *zoom: 1; } #upload-container-two ul li:nth-child(2n+2) { margin-left: 25.96%; margin-bottom: 3.85%; clear: none; } #upload-container-two ul li:nth-child(2n+3) { margin-left: 51.93%; margin-bottom: 3.85%; clear: none; } #upload-container-two ul li:nth-child(2n+4) { margin-left: 77.89%; margin-bottom: 3.85%; clear: none; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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