Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-10-31
2
Medium Priority
?
358 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

618 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