Keeping footer down

Front page Support Forums Tokyo Theme Support Keeping footer down

This topic contains 4 replies, has 2 voices, and was last updated by  satori 3 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2518

    CREDO
    Participant

    Is there a way to have a “sticky footer” so it stays at the bottom when there isn’t enough content to push it down?
    Thanks!

    #2534

    satori
    Member

    Hey Credo,

    first of all, thank you for the purchase!

    The footer “flows” together with the rest of the page’s element in most WordPress themes, and I would not recommend fixing it to the bottom of the page – e.g. on smaller screens it might look quite ugly; instead, I’d recommend inserting several empty lines into the page to make the content higher (e.g. by using the line break tags in the “Text” editor mode).

    However, if you do need to fix the footer on a particular page, you can do it by adding some custom CSS, as follows:

    .page-id-XX #footer { position: fixed; bottom: 0; width: 100%; z-index: 10; }

    replacing the “XX” with the page ID; this code can be added at the bottom of the theme’s “style.css” file (opens by default when you visit the “Appearance -> Editor” admin section.

    Sincerely,
    Andrii / Satori Studio

    #2544

    CREDO
    Participant

    That’s perfect, thanks!

    #2547

    CREDO
    Participant

    Actually, I guess I was thinking of it only sticking when screen height exceeds the content length. Would that be too complicated with for CSS?

    #2569

    satori
    Member

    Hey Credo,

    this is not possible with CSS (you can check out other premium and free WP themes, they all have a floating footer). It might be possible via some custom javascript for example, but I’m not sure anyone ever did that.

    Sincerely,
    Andrii / Satori Studio

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.