Note that there are some explanatory texts on larger screens.

plurals
  1. POproblem implementing css sticky footer with liquid/fluid layout
    primarykey
    data
    text
    <p>I am trying to implement the CSS Sticky Footer method as shown at <a href="http://cssstickyfooter.com" rel="nofollow">cssstickyfooter.com</a>. (I have also tried <a href="http://ryanfait.com/resources/footer-stick-to-bottom-of-page/" rel="nofollow">Ryan Fait's</a> solution but to no avail).</p> <p>I have followed everything to a t, or least I think I have. I have a container <code>div</code> (they call it wrap), a logo bar (they call it a header) and a page <code>div</code> (they call it main) then I have my footer.</p> <p>So here is the problem, if I have the <code>overflow:auto</code> on then I get a really short <code>div</code> and a scroll bar (yucky). But if I comment it out all my content shows but the page still believes that the <code>div</code> is the same size as if the <code>overflow:auto</code> was not commented out. </p> <p>It otherwise works just as it should. The footer stays at the bottom and when resizing, it stops at the short page/main <code>div</code>. Is there any way to get it to the bottom of my content? I should mention that I can't use fixed height for my page/main <code>div</code> because I need it to resize based on the size of the <code>div</code>'s it contains (whichever one is visible at the time).</p> <p>It may or may not be the footer causing the issue, either way I could use some help figuring this out.</p> <p><strong>HTML:</strong></p> <pre><code>&lt;body&gt; &lt;div id="container"&gt; &lt;div id="logo"&gt; &lt;div id="home-flower"&gt;&lt;/div&gt;&lt;!-- end home-flower --&gt; &lt;div id="about-flower"&gt;&lt;/div&gt;&lt;!-- end about-flower --&gt; &lt;div id="proof-flower"&gt;&lt;/div&gt;&lt;!-- end proof-flower --&gt; &lt;div id="contact-flower" &gt;&lt;/div&gt;&lt;!-- end other-flower --&gt; &lt;/div&gt;&lt;!-- end logo--&gt; &lt;div id="page"&gt; &lt;div id="spacer"&gt;&lt;br/&gt;&lt;/div&gt;&lt;!-- end spacer --&gt; &lt;div id="home"&gt;home&lt;/div&gt;&lt;!-- end home --&gt; &lt;div id="about"&gt;about&lt;/div&gt;&lt;!-- end about --&gt; &lt;div id="proof"&gt;proof of concept&lt;/div&gt;&lt;!-- end proof --&gt; &lt;div id="contact"&gt;contact&lt;/div&gt;&lt;!-- end contact --&gt; &lt;/div&gt;&lt;!-- end page --&gt; &lt;/div&gt;&lt;!--end container--&gt; &lt;div id="footer"&gt; &lt;/div&gt;&lt;!-- end footer --&gt; &lt;/body&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>* { margin:0px auto !important; } html, body { height:100%; } #container { width:800px; background-color:#F0F; min-height: 100%; height: auto !important; height: 100%; } #page{ width:100%; min-height:100%; position:relative; background-color:#F00; padding-bottom:75px; /*overflow:auto;*/ } #logo{ position:relative; width:100%; height:210px; top:0px; left:0px; background:url(images/logo.png); } #home{ position:absolute; width:100%; height:100%; top:0px; left:0px; visibility:visible; } #about{ position:absolute; width:100%; height:100%; top:0px; left:0px; visibility:hidden; } #proof{ position:absolute; width:100%; height:100%; top:0px; left:0px; visibility:hidden; } #contact{ position:absolute; width:100%; height:100%; top:0px; left:0px; visibility:hidden; } #footer { position:relative; margin-top:-75px; width:800px; height:75px; background-color:#C0F; clear:both; } #spacer { position:relative; line-height:20px; } </code></pre>
    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.
 

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