Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to picture file 3 66
How can I expand text with explaination 5 30
Adjust the position 3 45
would like the bottom of this page to be smaller 3 11
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now