Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-27-2011, 11:07 AM   #1
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
css position question

how can I prevent the main_wrapper from overlapping the footer? the footer has to maintain and position: absolute so that it stays flushed at the bottom of the browser.


Code:
#page_contain {
    min-height: 100%;
    position: relative;
}

#main_wrapper {
    width: 950px;
    height: 800px;
    margin: 0 auto 25px auto;
    position: relative;
    border: 1px solid #000;
}

#footer {
    position:absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    text-align: center;
    font-family: Verdana;
}
html

Code:
<div id="page_contain"></div>
<div id="main_wrapper"></div>
<div id="footer">
line 1 <br />
line 2 <br />
line 2 <br />
line 2 <br />
line 2 <br />
line 2 <br />
</div>
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 11:14 AM   #2
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
wrap it up. drop the absolute. margin it correctly.
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 11:16 AM   #3
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
Originally Posted by Deej View Post
wrap it up. drop the absolute. margin it correctly.
That sounds like lyrics to a song.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 11:26 AM   #4
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Code:
#main_wrapper {
    width: 950px;
    height: 800px;
    margin: 0 auto 25px;
    position: relative;
    border: 1px solid #000;
}

#footer {
    position:relative;
    bottom: -10px; margin-bottom:10px; /*cross-browser compatibility */
    width: 100%;
    height: auto;
    text-align: center;
    font-family: Verdana;
clear:both;
}
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 11:48 AM   #5
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
thanks harvey, that worked perfectly
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 12:04 PM   #6
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
questions, i've noticed if main_wrapper height is set to 100% the footer no longer stays on the bottom. so in order for the code above to work it has to maintain a fixed height?
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 12:20 PM   #7
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by acctman View Post
questions, i've noticed if main_wrapper height is set to 100% the footer no longer stays on the bottom. so in order for the code above to work it has to maintain a fixed height?
ah, no, I got what yo want to do now, the code is different:

Code:
#main_wrapper {
    width: 950px;
height:auto;
min-height:800px; /*adjust as needed or simply delete */
    margin: 0 auto 25px;
    position: relative;
    border: 1px solid #000;
}

#footer {
    position:absolute;
    bottom: 0px;
    width: 100%;
    height: auto;
    text-align: center;
    font-family: Verdana;
clear:both;

}
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 12:21 PM   #8
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
http://ryanfait.com/resources/footer...ottom-of-page/
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 12:44 PM   #9
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
Harvey is a mad machine!
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 12:52 PM   #10
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Quote:
Originally Posted by grumpy View Post
I tried that one out when coding my main page worked fine, but did not work will with my inside pages.



thanks harvey everything is working now
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-27-2011, 01:34 PM   #11
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by Deej View Post
Harvey is a mad machine!
ha ha, you're using the lame anim I made young grasshopper! On a side note, I sent someone your way regarding some work a few days ago, did he contact you?

Quote:
Originally Posted by acctman View Post
I tried that one out when coding my main page worked fine, but did not work will with my inside pages.



thanks harvey everything is working now
that's because that solution is pretty lame and flaky. And added to that there's a horrible misconception that everything OUTSIDE GFY is better, and "mainstream" designers/coders are better (????) when most of the times that premise is wrong (or the extremely good ones are beyond anyone's pockets, so it's the same result)
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.