- This topic has 24 replies, 4 voices, and was last updated 5 years, 5 months ago by
Leo.
-
AuthorPosts
-
October 8, 2020 at 11:11 am #1479019
Tanya
No. Please refresh the referred pro-learn-more page. I have applied your CSS to all pages and this (longer page) has broken.
October 8, 2020 at 11:13 am #1479024Leo
StaffCustomer SupportThis is the CSS you are adding:
https://www.screencast.com/t/3AMwUMaP8yRJWhich is not the same as what I provided here:
https://generatepress.com/forums/topic/extend-the-footer-for-short-pages/#post-1478995Can you try to copy and paste my code?
The code should only be applied to the short page so we need to target those pages specifically.
October 8, 2020 at 11:19 am #1479032Tanya
Leo, I have copied your code exactly. However, this is not what I want. Reason being is that different screen sizes will have different pages that considered to be “short”. Plus most of my pages are dynamic and I cannot predict how long they will be. The CSS has to work for all pages. Do you disagree?
October 8, 2020 at 11:26 am #1479035Leo
StaffCustomer SupportHmm dynamic pages make things a little more tricky.
What about just this?
body { min-height: 100vh; }October 8, 2020 at 11:37 am #1479043Tanya
Nope. Short page still has white space after the footer. Long page is not affected in any way.
I wonder why this original CSS does not work anymore. It worked perfectly for all pages in float version of the theme.
.site-footer:after {
position: fixed;
background: #110532;
outline: 1px solid #110532;
height: 100%;
width: 100%;
}October 8, 2020 at 11:41 am #1479047Leo
StaffCustomer SupportOne more try:
body { min-height: 100vh; display: flex; flex-direction: column; width: 100%; } .site-footer { margin-top: auto; }October 8, 2020 at 12:02 pm #1479071Tanya
Thanks Leo.
This CSS solves footer footer look for both short and long pages!
From a quick look I think body display:flex introduces a couple of layout issues to the pages though.I will look into those issues and try to fix. Thanks for all your help on this one!
October 8, 2020 at 4:10 pm #1479357Leo
StaffCustomer SupportNo problem 🙂
October 20, 2020 at 7:21 am #1497004Tanya
Just to close this off.
The solution that worked for me to extend the footer color for the short pages is the original CSS I had before with the addition of content:””;
.site-footer::after { position: fixed; background: #110532; height: 100%; width: 100%; content: ""; }October 20, 2020 at 8:53 am #1497301Leo
StaffCustomer SupportSounds good thanks for sharing!
-
AuthorPosts
- You must be logged in to reply to this topic.