For beginners: keep footer on the bottom of the page

Started on the old forum in May 2015 · view the original in the archive · old links redirect here

3 replies · 176 views · started 11 years ago · 1 min read

3 participants
Mysterio Lead · 630 posts #1

It frustrated me a lot on my first days on web development: keeping the footer on the bottom of the web page. I did those two clean and simple examples: you can see them and copy the source-code. 🙂

http://mysterio.info/demo/bottomfooter/

👍 1
Share

mysterio.al - programming is a functional art

Mysterio Lead · 630 posts #3

GumSlone wrote: position: absolute; bottom: 0;

thats all what you need to do.

Thanks for the reply. But that's not "all what you need to do".

You are generally correct but you will always need "more properties" to make it work as it should. Generally, position: absolute; bottom: 0; - will either overflow elements, or position in the left-bottom side of the screen (not on the content).

mysterio.al - programming is a functional art

GumSlone Administrator Principal · 1,690 posts #4

then add margin bottom 🙂 for the content below, and no, it will not be left bottom of the screen when its placed correctly, you need to do more css adjustments depending on your site style, and template, but position absolute is the thing if you want to use css only sticky menu.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Mysterio Lead · 630 posts #5

I don't doubt your skills but I don't doubt mines either. And yes, position absolute is the thing; that's what I also did in the example/demo if you saw it before commenting. But position absolute is not all it takes. Cheers!

mysterio.al - programming is a functional art

GumSlone Administrator Principal · 1,690 posts #6

lol, ok, it was just my recommendation how to do it, its up to you how you make it. I have made several sites where it works for me so i just shared my experience.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

something else Fellow · 2,296 posts #7

There is more than one way to boil an egg - how ever most are bias to the creators browser.

Eg: I should imagine safari will render the objects slightly different than firefox - so setting it up perfect on 1 web browser is not always the best way, rather than trying to cater for them all 🙂

Mysterio Lead · 630 posts #8

hahah, come on, you also know "position: absolute; bottom: 0;" doesn't work if you don't add the other (necessary) properties. no doubt you did several sites, but your example is just a part of the solution.

as the title says, its an example for the beginner on how to do it 😉

mysterio.al - programming is a functional art

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close