Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You would want max-device-width as the browser is changing the current width to match the content (leading to scrolling or scaling and no longer matching your media rule.)</p> <p>Take a look at: <a href="https://stackoverflow.com/questions/6747242/what-is-the-difference-between-max-device-width-and-max-width-for-mobile-web">What is the difference between max-device-width and max-width for mobile web?</a></p> <p><em>EDIT</em>: Here is a much better link on more options and iphone specific oddities: <a href="http://www.quirksmode.org/blog/archives/2010/09/combining_meta.html" rel="nofollow noreferrer">http://www.quirksmode.org/blog/archives/2010/09/combining_meta.html</a></p> <p>I also made a little detector to get at the actual numbers: <a href="http://jsfiddle.net/JztA4/2/" rel="nofollow noreferrer">http://jsfiddle.net/JztA4/2/</a></p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script&gt; var s = ""; for (var i = 0; i &lt; 4096; i++) { var dev = i % 2 ? "device-" : ""; s += "\n @media all and ( min-" + dev + "width:" + i / 2 + "px) {\n#" + dev + "width:before {\ncontent:'" + Math.floor(i / 2) + "';\n}}\n"; } s += "\n#sanity:before{content:'youbet';display:inline;}\n"; l = document.createElement("link"); l.setAttribute("type", "text/css"); l.setAttribute("rel", "StyleSheet"); l.setAttribute("href", "data:text/css," + s); document.head.appendChild(l); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;ul&gt; &lt;li&gt;sanity: &lt;span id="sanity"&gt;&lt;/span&gt; &lt;/li&gt; &lt;li&gt;width: &lt;span id="width"&gt;&lt;/span&gt; &lt;/li&gt; &lt;li&gt;device-width: &lt;span id="device-width"&gt;&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>But my use of data uri's etc also will upset older browsers, so you would need to copy the style into a real css sheet or maybe style element(s).</p> <p>I have no pressing need to create a fully dynamic site, so I wont be mapping out results, but if anyone does please consider updating the jsfiddle and/or this question.</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. 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