Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy doesn't height:auto work on these two elements?
    text
    copied!<p>I want my main-div and footer-div grow with the content (height:auto). height:auto works fine for the footer, but not for the main content. When I try it for the main-wrapper it messes up the page. To be exact, the footer takes over the whole footer and main together. The structure of my page is something like this:</p> <pre><code>&lt;div id="page-wrapper"&gt; &lt;div id="header"&gt;&lt;/div&gt; &lt;div id="main-wrapper"&gt;&lt;/div&gt; &lt;div id="footer"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>And this is the css of each div:</p> <pre><code>#page-wrapper{ margin-left:auto; margin-right:auto; width:85%; -moz-box-shadow: 6px 0 4px -4px #888 , -6px 0 4px -4px #888; -webkit-box-shadow: 6px 0 4px -4px #888 , -6px 0 4px -4px #888; box-shadow: 6px 0 4px -4px #888 , -6px 0 4px -4px #888; border-right:solid 1px #CCC; border-left:solid 1px #CCC; } #header{ margin-left:auto; margin-right:auto; width:100%; height:200px; background-color:#ffffff; } #main-wrapper{ width:100%; height:auto; /* this line is the problem */ margin-left:auto; margin-right:auto; background-color:#E5E7EE; } #footer{ width:100%; height:auto; background-color:#ffffff; } </code></pre> <p><strong>UPDATE:</strong> </p> <p>Inside main-wrapper I have these 2 divs:</p> <pre><code>#text-wrapper{ width:60%; float:left; font-weight:300; padding-left:50px; } #login-register-field{ float:right; width:300px; height:260px; background-color:#BDBCC4; -webkit-border-radius:12px; -moz-border-radius:12px; border-radius:12px; margin-right:40px; margin-top:80px; position:relative; } </code></pre> <p>Could these be causing the problem?</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