Archived topic
Back to top button position
3 replies · Started by ian on February 8, 2016
Hi
The "Back to top button" is
horizontally is positioned relative to the body I would like it relative to the content
This is because on a wide screen "Back to top button" is way over to the right I think it should be below the right sidebar for example
Is this possible ?
Ian
Hi Ian,
In order for the button to remain visible at all times, it need fixed positioning.
Unfortunately, there's no way to apply the fixed positioning to specific elements in the browser (sidebars etc..) - fixed positioning is always relative to the entire screen.
Of course, you can adjust the positioning, but remember how it will look on smaller screens/phones:
.generate-back-to-top {
bottom: 30px; /* 30px from the bottom of the screen */
right: 30px; /* 30px from the right of the screen */
}
Hi Tom
Thanks for that
FYI
I have found a compromise doesn't provide a precise solution but does take the icon away from right edge on large screens and still works on mobiles etc
.generate-back-to-top {
right: 20%;
}
Perfect :)
