AnnaGroman Posted October 26, 2022 Share Posted October 26, 2022 I'm trying to make the footer the same color as the section above it, but having issues. Ideally this would change when the user goes to another page. For example on this page it would continue the green pattern background, while on this page it would continue the blue patterned background. Is there a way to do this? Link to comment
joseph81 Posted October 26, 2022 Share Posted October 26, 2022 Well to continue with the beforehand started background... that would be much more work I guess, but to start again the same background as the previous section had, that is easier: const prevBgSrc = document.querySelector('#content .index-section:last-child img').src; document.getElementById('footer').style.backgroundImage = `url(${prevBgSrc})`; AnnaGroman 1 Jozsef Kerekes - Front-end developer and Squarespace enthusiast My Blog: https://ui-workarounds.comIf you like my answer, please give me an upvote/like. Highly appreciated. Link to comment
AnnaGroman Posted October 26, 2022 Author Share Posted October 26, 2022 @joseph81Thank you! Ideally it would continue with the beforehand started background. Would it be something that is possible with z-index and extending that section above padding? Link to comment
joseph81 Posted October 26, 2022 Share Posted October 26, 2022 It could be done but it requires many changes ! Jozsef Kerekes - Front-end developer and Squarespace enthusiast My Blog: https://ui-workarounds.comIf you like my answer, please give me an upvote/like. Highly appreciated. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment