Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:39:58+00:00 2026-06-10T07:39:58+00:00

I have been trying to get this my damned layout to work for so

  • 0

I have been trying to get this my damned layout to work for so long now and its super frusterating. I am new to CSS so please be easy, but i have looked up so many articles about sticky footers and stretching content, etc etc etc, and i still can’t get it to work. Min-height does nothing for me!

Here is what i want my site to look like when it doesn’t have enough content to fill a page.

And this is what i want it to look like when the content makes you scroll.

Here is the html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to SilmanServer!</title>
<link href="./main.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="pageHeader"> 
<h1>SilmanServer</h1>
<p>Aaron Silman's Personal Home Server </p>
</div>

<div id="navigation">
    <ul>
        <li><a href="./index.html">Home</a></li>
        <li><a href="./blog.html">Blog</a></li>
        <li><a href="./projects.html">Projects</a></li>
        <li><a href="./about.html">About Me</a></li>
        <li><a href="./contact.html">Contact</a></li>
    </ul>
</div>


<div id="main">

<div>
<h2>What the hell?</h2>
    <p>
    This the project I embarked on around June of 2012 with an old computer that I had at home. My goal: To transform that old, useless HP Pavilion a6750y into a fully functioning webserver for this website! Along the way I also learned (X)HTML, CSS, Javascript, PHP, MySQL and a bunch of other things needed for designing and developing websites, as well as administrating my own server.
    </p>
</div>

<div>
<h2> Why? </h2>
    <p> As mentioned before, I really wanted to learn how to build websites that function both on the client side and server side. I wanted to just play around and learn. So I started learning, beginning with the basics. I will also use this website as documentation, tracking my progress and noting a lot of important steps so if anyone (including myself - in case I forget) wants a guide to setting up a server and learning web design and development they an refer to <a href="./guide_to_the_web.html">this page </a> for a complete, idiot-proof, guide to the web from scratch.
    </p>
</div>

</div>

<div id="pageFooter">
    <p> This is a footer
    </p>
</div>

</div>
</body>
</html>

and here is the CSS:

/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}

/* Global Styles */

html{
    background: url(./images/sway.jpg);
    background-attachment: fixed;
    background-repeat::no-repeat;
}

body {
    width: 80%;
    margin: 0 auto; 
}
/* pageHeader Styles */

#pageHeader{
    height: 100px;
    background:#999;
}

#pageHeader h1 {
    padding-left: 30px;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 3.5em;
    color:#F93;
}

#pageHeader p{
    padding-left: 40px;
    font-family: "Times New Roman", Times, serif;
    font-size: 2em;
    color: white;
}

/* navigation Styles */

#navigation{
    float:left;
    width:100%;
    background: #0CF;
    overflow: hidden;
    position: relative;
}

#navigation ul{

}

#navigation li{
    float: left;
    margin: 0 20px;
    font-size: 1.5em;
}

#navigation li a:link {color:#F60;}    /* unvisited link */
#navigation li a:visited {color:##89ABFC;} /* visited link */
#navigation li a:hover {color:#3FF;}   /* mouse over link */
#navigation li a:active {color:#009;}  /* selected link */

/* main Styles */

#main{
    width: 80%;
    margin: 0 auto;
    border: 2px solid black;
    background: #999;
    color: #FFF;
}

/* pageFooter Styles */

#pageFooter{
    height: 100px;
    background:#999;
}

#pageFooter h1 {
    padding-left: 30px;
    font-family:Arial, Helvetica, sans-serif;
    font-size: 3.5em;
    color:#F93;
}

#pageFooter p{
    font-family: "Times New Roman", Times, serif;
    font-size: 2em;
    color: white;
}

What can i do to achieve this effect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:40:00+00:00Added an answer on June 10, 2026 at 7:40 am

    What you’re looking for is a “sticky footer”.

    • The older CSS-only way of doing this requires that you know the exact height of the footer. The best solution I was able to find through a quick Google search is Ryan Fait’s Sticky Footer. Ryan’s tutorial works by putting a height of 100% on a wrapper element (which contains your content except the footer). This 100% height is what makes your content push the footer to the bottom of the window, and then the footer worms its way back up into the visible area using a negative margin (which is why you need to know the height of the footer… the negative margin must be the same height as the footer element). There are a few additional pieces to make it work reliably in all browsers (like the <div class="push"></div>), but that’s basically what’s happening.

    • A newer CSS-only solution requires the use of display: table; (not supported by IE7), but allows for a variable height footer (see Sticky CSS footers: The flexible way). This is probably the method I would recommend.

    The author of the second article mentions that Javascript could be used to add IE7 support, but stops short of writing the actual Javascript. At the time of this answer, StatCounter lists IE7 as having roughly 1.28% market penetration. I’ll leave it to you to determine if IE7 support is important, but I’d like to add my $0.02 if I may :-p First, all users of IE7 have an upgrade path to IE8, and users who refuse to update are only making life more difficult for web developers (IE7 to IE8 open up possibilities for many important CSS2 selectors, as well as fixing many nagging float issues and making display: table; possible). In addition to making life harder for web developers, they are leaving themselves open to a multitude of browser hacks that will compromise their computer, making them an easy target for hackers looking to expand their zombie army (which makes security more difficult for everyone else). Second, Do websites need to look exactly the same in every browser? (and of course, the answer is “No”) As long as having a footer on the bottom of the browser window can be considered a progressive enhancement, you shouldn’t need to worry.

    That being said… I updated the code so it should work in IE7 :-p Please take a look at the jsfiddle and let me know how it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get this to work for 12 hrs now and
I have been trying to get this code to work for a while now
Okay I have been trying to get this to work for some time now.
I have been trying to get this to work correctly and I think I
I have been trying to get this jsfiddle to work. So far without luck.
I have been trying to days now to get this website completed ... however,
This is crazy, I have been trying for hours to get this to work.
I have been trying to get this to work and can't. I have a
I have been trying to get this effect for a couple of hours now
I have been trying to get this query to work but I am stumbed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.