Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 04-13-2012, 06:33 PM
Amazing's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 04-07-12
Posts: 85
iTrader: 0 / 0%
My forum footer doesn't stick to the bottom of the page - I need help!



As you can see, the footer isn't at the bottom of the page sometimes and I'm not sure why.

The following is my footer CSS:

Code:
#foot { width: 100%; margin: 0 auto; position: relative; bottom: 0; height: 250px; background: url(images/v2/footerbg.png); border-top: 1px solid #000; color: #fff; }
You can view my site here (if you have firebug and need to view code): http://sportsbb.net/
__________________
Deep Discussions - Current events, hot topics, debates and more...
 
Reply With Quote
  #2 (permalink)  
Old 04-13-2012, 08:31 PM
Super Moderator
Latest Blog:
None

 
Join Date: 11-11-11
Location: Copenhagen, Denmark
Posts: 1,858
iTrader: 0 / 0%
The easiest way would probably be to set a minimum height of the content in the middle of the page, moving the footer down.

Something like:
#content{
min-height: 400px;
}
__________________
Need a break? EnterCave more than 40000 online games in 15 categories.
Search or browse through EnterCave Online Games Directory
 
Reply With Quote
  #3 (permalink)  
Old 04-14-2012, 06:24 AM
Amazing's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 04-07-12
Posts: 85
iTrader: 0 / 0%
Okay, so I should set a minimum height on my container? That's where the middle content is:

Code:
#container { width: 95%; color: #000000; margin: auto auto; padding: 20px; text-align: left; /* IE 5 fix */ clear: both; }
Edit ----- Awesome, I got it, thanks so much!
__________________
Deep Discussions - Current events, hot topics, debates and more...

Last edited by Amazing; 04-14-2012 at 06:29 AM.
 
Reply With Quote
  #4 (permalink)  
Old 04-14-2012, 09:53 PM
webcosmo's Avatar
Contributing Member
 
Join Date: 03-17-07
Location: Boston, MA
Posts: 1,988
iTrader: 5 / 100%
you have to have the container height 100% leaving a bottom margin equal to the footer height.
here is a nice piece of code http://ryanfait.com/resources/footer...ottom-of-page/
__________________
Webmaster Forum
 
Reply With Quote
  #5 (permalink)  
Old 04-16-2012, 02:31 AM
JohnnyS's Avatar
Contributing Member
 
Join Date: 07-05-11
Location: philippines
Posts: 312
iTrader: 0 / 0%
Quote:
Originally Posted by Amazing View Post


As you can see, the footer isn't at the bottom of the page sometimes and I'm not sure why.

The following is my footer CSS:

Code:
#foot { width: 100%; margin: 0 auto; position: relative; bottom: 0; height: 250px; background: url(images/v2/footerbg.png); border-top: 1px solid #000; color: #fff; }
You can view my site here (if you have firebug and need to view code): http://sportsbb.net/
it is because the content of your page does not take up all of the height of the browser, what you can to is put a height 100% on your html and body tags..

Code:
html,body { height:100%; position:relative; }
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Footer not stretching 100% across bottom of webpage, any idea's why? basslion Coding Forum 2 09-06-2011 01:03 PM
Suggestion for forum owners: Stick to niches that by their nature are more mature ChrisGuthrie Forum Management 13 05-24-2010 11:30 AM
How to add a menu bar at bottom of page like on this site? madcaptains Blogging Forum 1 12-16-2009 06:15 PM
parse error at bottom of page robpicken Coding Forum 23 06-03-2004 05:37 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:38 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.