Huib Posted December 30, 2023 Posted December 30, 2023 Hi, I have a problem with making my second footer section sticky for mobile use. I have made two footer section, section 1 only visible for desktop use, section 2 only visible for mobile us. The desktop footer (section one) don't have to be sticky. Section two must be sticky. If I use this CSS, as mentioned in instruction video, the mobile footer won't stay sticky. Could you please help me? #footer-sections .page-section:last-of-type { position: fixed!important; width: 100%!important; bottom: 0!important; z-index: 99!important } /* Hide this on Tablet - Desktop */ @media screen and (min-width:768px) { [data-section-id="65908a58c056a6178ddb0923"] { display: none; } } // Hiding sections on mobile @media screen and (max-width: 641px) { section[data-section-id="659091cc44189d1cbbceb870"] { display:none !important; } } Footer { border-top: 1px solid ; } Website: www.studioswoop.nl key; !Uchtball0n Thanks
tuanphan Posted January 1 Posted January 1 I see it already sticky on mobile to me Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Huib Posted January 5 Author Posted January 5 Hi, That's because I haven't added a footer for desktop yet. I have added it now... As you can see I have different footersections, several for mobile (which should serve as navigation buttons) and one for the entire desktop website. But with the current CSS the desktop footer stays sticky too. In stead this one doens't stay sticky. Thanks in advance
Solution tuanphan Posted January 8 Solution Posted January 8 To make mobile footer sticky only, change this your code #footer-sections .page-section:last-of-type { position: fixed!important; width: 100%!important; bottom: 0!important; z-index: 99!important } to this @media screen and (max-width:767px) { #footer-sections .page-section:last-of-type { position: fixed!important; width: 100%!important; bottom: 0!important; z-index: 99!important } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment