Sticky Footer

w/e

Boaroceraptorasaurus-Rex
Reaction score
274
In HTML:

Anybody know how I can set the bottom margin of the page to 0. So as to make the bottom of the graphics on the page to stretch to the very bottom pixel of the screen? I can't get it. Basically I want a footer that stays at the very bottom of the page.

Pls god nobody link me that sticky footer css tutorial because ive looked through it several times and really dont want to use it.
 

UndeadDragon

Super Moderator
Reaction score
447
What about:

Code:
<html>
<head>
<title>No Bottom Margin</title>
</head>

<body style="margin-bottom: 0; padding-bottom: 0;">
</body>
</html>

Or do you mean a footer that stays at the bottom, no matter how big the page, or screen is?
 

w/e

Boaroceraptorasaurus-Rex
Reaction score
274
Yeah, I basically have a table with which I need the bottom row to stick to the bottom of the page, even though it doesn't stretch all of the way.
 

UndeadDragon

Super Moderator
Reaction score
447
Maybe this would work:

Code:
<html>
<head>
<title>Page Title</title>
<style type="text/css"></style>
body
{
padding: 0;
margin: 0;
height: 100%;
}
#container
{
position: relative;
width: 100%;
height: 100%;
}
#footer
{
position: absolute;
bottom: 0;
width: FOOTER_WIDTH;
}
</style>
</head>

<body>
<div id="container">
 All your tables go here
<div id="footer">
Footer Stuff Here
</div>
</div>
</body>
</html>

Note: Haven't tested it yet
 

JerseyFoo

1/g = g-1
Reaction score
40
Yeah, I basically have a table with which I need the bottom row to stick to the bottom of the page, even though it doesn't stretch all of the way.
Problem is your using a table.

Put that row's data in a div on the bottom of a page, and set body's margin to 0.

Using "position" here is a hack and is not necessary, unless you'd like the footer to stick on pages w/ a height less than the screen's.
 

w/e

Boaroceraptorasaurus-Rex
Reaction score
274
Problem is your using a table.

Put that row's data in a div on the bottom of a page, and set body's margin to 0.

Using "position" here is a hack and is not necessary, unless you'd like the footer to stick on pages w/ a height less than the screen's.

Yeah I need them to stick to the bottom even if the height doesn't necessarily stretch to the bottom.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top