Site logo

Archived topic

Change Back to Top Button Color

5 replies · Started by Tim Zurawski on February 16, 2019

Viewing posts 1–6 of 6

I want to change the color of the button on SOME pages, but not all.

My guess is I need to make a new class, but don't have a grasp on this yet. Current css is below, but it doesn't address the color of the button (up arrow).
Also was thinking of changing the up graphic.


<span class="screen-reader-text">Scroll back to top</span>

So where does this code get color and shape info?

thank you

Hi there,

You can just target specific pages in your CSS. For example:

.page-id-xx .generate-back-to-top, .page-id-xx .generate-back-to-top:visited {
    background-color: #000;
    color: #fff;
}

Leo,
Thank you, but that doesn't explain to me where to put that css and where to get page id and the difference between background-color and color. And you didn't address how to use other graphics.

Responding without helping is useless!

- I see David has already explained before so I figured you'd know already:
https://generatepress.com/forums/topic/replace-elementor-nav-with-gp-nav-and-remove-header/#post-616771

Here it is again:
Adding CSS: https://docs.generatepress.com/article/adding-css/

- Page ID: https://www.wpbeginner.com/beginners-guide/how-to-find-post-category-tag-comments-or-user-id-in-wordpress/

- Background color and color: https://stackoverflow.com/questions/39033070/css-color-vs-background-color-vs-background

- Are you wanting to use another icon?

When it's general, non-theme related questions like how to find page ID and background color vs color, you can always find good answers on Google, or simply test them out.

This archived topic is closed to new replies.