Note that there are some explanatory texts on larger screens.

plurals
  1. POmedia query, changing left position is not working?
    text
    copied!<p>I tired many ways, but I can't get this media query to work.<br> "#Content" just doesn't change left position when I resize the window !<br> must be a way to make it run correctly !<br> Here's the code:<br><br> index.html<br></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt; &lt;title&gt;index&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="layout"&gt; &lt;div id="fixed-sidebar"&gt; &lt;/div&gt; &lt;div id="content"&gt; content to make error visible ! &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>style.css<br></p> <pre><code>* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } #layout { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } #fixed-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 460px; background-color: rgb(33, 40, 46); overflow: hidden; padding: 20px; color: white; } #content { position: absolute; top: 0; right: 0; bottom: 0; left: 460px; overflow-y: scroll; padding: 20px; background-color: lightgrey; } @media screen and (min-width: 1151px) { #fixed-sidebar { width: 460px; } #Content { left: 460px; } } @media screen and (max-width: 1150px) and (min-width: 700px) { #fixed-sidebar { width: 40%; } #Content { left: 40%; } } </code></pre> <p>Here is a jsfiddle: <a href="http://jsfiddle.net/X3U2f/1/" rel="nofollow">http://jsfiddle.net/X3U2f/1/</a></p> <p>What I'm doing wrong ? :/ <br> (PS: I tried to put them important but still ignoring left position !) <br> Thank you</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