New Front EN › Support Forums › Tokyo Theme Support › Keeping footer down
- This topic has 4 replies, 2 voices, and was last updated 7 years ago by
satori.
-
AuthorPosts
-
February 15, 2014 at 6:50 pm #2518
CREDO
ParticipantIs 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!February 16, 2014 at 11:05 pm #2534satori
KeymasterHey 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 StudioFebruary 17, 2014 at 11:17 pm #2544CREDO
ParticipantThat’s perfect, thanks!
February 18, 2014 at 12:43 am #2547CREDO
ParticipantActually, I guess I was thinking of it only sticking when screen height exceeds the content length. Would that be too complicated with for CSS?
February 18, 2014 at 1:45 pm #2569satori
KeymasterHey 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 -
AuthorPosts
- You must be logged in to reply to this topic.