Solved

How can I make this footer stick to the bottom of the page?

Posted on 2013-10-31
2
353 Views
Last Modified: 2013-10-31
Here's my CSS:

body {
   margin:0;
   padding:0;
   height:100%;
}
#container {
   min-height:100%;
   position:relative;
}
#header {
	background:#ffffff;
	padding:10px;
	text-align:center;
}
#body {
   padding:10px;
   padding-bottom:30px;   /* Height of the footer */
}

#body_container {
width:1000px;
margin: 0 auto;
height:100%;
}

#footer {
   position:absolute;
   padding-top:8px;
   bottom:0;
   width:100%;
   height:30px;   /* Height of the footer */
   background:#000000;
   text-align:center;
}

Open in new window


Here's my HTML:

<html>
<body>
   <div id="header"><IMG SRC="images/admin_header.jpg"></div>
   <div id="body">
            <div id="body_container">      
            
            <!--here's my content. Looks good until the page goes beyond the screen dimension and then the footer, while it looked good when you were perusing above the fold, is now
            in the middle of the screen. -->
            
            </div>
   </div><!-- concludes body --><BR><BR>
<div id="footer">
<table align="center">
<tr>
<td align="center" class="Footer">
<A HREF="http://www.specialpromotionsinc.com" target="_blank" class="Footer">Special Promotions Inc.</a> | 63 Music Square East | Nashville, TN 37203 | (p) 615.321.5130 | (f) 615. 320.1708
</td>
</tr>
</table>
</div>
</body>
</html>
Screen-Shot-2013-10-31-at-9.56.5.png
0
Comment
Question by:brucegust
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 39614290
In your CSS please remove  position:absolute;, try this change:

#footer {
   padding-top:8px;
   bottom:0;
   width:100%;
   height:30px;   /* Height of the footer */
   background:#000000;
   text-align:center;
}

Open in new window

0
 

Author Comment

by:brucegust
ID: 39614579
That did it!

Thanks!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question