LexM Posted October 1 Posted October 1 (edited) Site URL: https://www.compatiblewithlove.org/ @tuanphan I inserted your scroll to top button on my footer using this HTML code: <a href="#top" class="t-top"><span class="arrow"></span>Top</a> And this CSS Code: /* Back to Top */ .t-top { font-weight: 300; letter-spacing: 3px; font-size: 15px; text-transform: uppercase; text-align: center; line-height: 1.6; padding-left: 2px; padding-top: 4px; position: fixed; right: 0px; bottom: 100px; width: 40px; height: 40px; z-index: 999; background-color: transparent; color: #000; } .t-top .arrow:before { font-family: 'squarespace-ui-font'; font-style: normal; font-weight: 300; font-size: 20px; line-height: 1; -webkit-font-smoothing: antialiased; content: "\e02d"; text-align: center; display: block; vertical-align: middle; transform: rotate(-90deg); cursor: pointer; margin-left: -4px; } .t-top .arrow {display:inline;} /* align center back to top */ a.t-top { text-align: center; display: block; width: 100%; It works great on my footer and is exactly the look and placement I wanted. But I noticed that it was appearing in the second section of the homepage (the light blue section) as well, but wasn't clickable. I only want it to show on my footer. Any idea what is making it appear at the top of the page and only in the second section as well? Edited October 1 by LexM
LexM Posted October 2 Author Posted October 2 It looks like it only appears once I have clicked on the button. Any ideas on why this is happening?
Solution tuanphan Posted October 6 Solution Posted October 6 On 10/2/2024 at 8:56 PM, LexM said: It looks like it only appears once I have clicked on the button. Any ideas on why this is happening? You can change position: fixed; to position: absolute; or add this extra to Custom CSS #page article section { position: relative; z-index: 99999999999 !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