Solved

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

Posted on 2013-10-31
2
355 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 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Sort Order Icons on HTML Table 3 64
Pure CSS popout image menu - want the most beautiful style. 7 71
Fix a css menu for width 15 33
Text color in a select 11 23
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

726 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