Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centered Fixed Footer

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43226
    ewpiano
    Member

    I would like to have a fixed footer that stays in the centered horizontally no matter what size the viewport is. Could someone give me some help on how to do this? I’ve tried several solutions, but I can’t figure out how to get what I want. I want the footer to always be at the bottom of the viewport, but centered. The footer will have a Facebook like button, copyright information, and, possibly, a search bar. I’ve been making the width of the body of my webpages 1000px.

    #127412
    Merri
    Participant

    http://codepen.io/Merri/pen/DdFlp

    The important part is quite short:

    bottom: 0;
    left: 50%;
    margin-left: -500px; /* half of element’s width */
    position: fixed;
    width: 1000px;

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.