To Top position and make sticky
Make a To Top element in the footer:
go to the tab Advanced in the element
/*make the button sticky at the bottom*/
.uk-totop {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1;
}
Then make the To Top disappear at the top of the page and appear on scroll!!!
Navigate to YOOtheme > SETTINGS > Custom Code, and into the field labeled "SCRIPT" insert the following:
Then if it doesn't work add this
-
Into the field "CSS/LESS" insert the following CSS to make the To Top fade away:
html[data-scroll="0"] .uk-totop { opacity: 0; transition-property: opacity; transition-duration: 600ms; }Or alternatively just hide it:
html[data-scroll="0"] .uk-totop { display: none; }
YOOtheme answer:
https://yootheme.com/support/question/167313#answer-540905
This was the original to top css, the above has worked better for me.
.el-element {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1;
}
- Hits: 5