Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS margins acting strange
    primarykey
    data
    text
    <p>So I'm found an article on responsive design <a href="http://learn.shayhowe.com/advanced-html-css/responsive-web-design" rel="nofollow">(here)</a> and I tried to make something like what it had on part of the tutorial. The site said to divid the size of the element by the size of the container that the element(s) are in. (the reason I divided by 1000 and not 1050 is because the margins on the div#main make it 1000px even though the header is 1050px) If that doesn't make sense than the link can explain it. It looks fine with my browser at full size, but if I shrink the window to much then it doesn't resize the way it should. I'm not exactly sure what part of my code is wrong but if someone could help me that would be great! <a href="http://addisonbean.com/responsive.html" rel="nofollow">Here's</a> a link to the page I made. And here is my source code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; body, html { margin: 0; height: 100%; width: 100%; } header { height: 100px; max-width: 1050px; margin: 0 auto; } #main { border-radius: 25px; background-color: #aaa; height: inherit; max-width: inherit; margin: 25px; } .box { width: 47.5%; height: 75%; margin: 1.25%; background-color: #444; border-radius: 15px; float: left; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;header&gt; &lt;div id="main"&gt; &lt;span class="box"&gt; &lt;/span&gt; &lt;span class="box"&gt; &lt;/span&gt; &lt;/div&gt; &lt;/header&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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