Is it possible to use CSS to insert a back to top code?
-
Hi there, I know how to do page jumps inside of a post. (see http://en.support.wordpress.com/splitting-content/page-jumps/)
What I’m trying to find out is if using the Upgrade Customize CSS that I purchased, can I insert the equivalent of spot in the code so that when someone clicks on the “back to the top” link within a post, they are taken to the top of the PAGE, not just the top of the post.
I know that there are all kinds of name thingies (that would be the technical term) in CSS but I’m a CSS newbie and my google searches have turned up lots of hits but none of them seem to answer this question.
Can you set a Href ID type “thingie” using CSS.
Thanks! and Happy New Year! Woot!
The blog I need help with is: (visible only to logged in users)
-
Hi there,
You can actually do this without using any custom CSS. :) To do it, you can open the post editor to edit your post, and then highlight the words “back to the top” as if you were making a regular text link to another page. Then, next to URL in the popup that appears, you can just enter the pound (#) sign without anything else.
Here’s what that link looks like if you switch to the Text editor for your post:
<a href="#">back to the top</a>Please let me know if I can provide any further help with this. :)
-
Thank you Rachel for sharing that with me. :-) I knew of that trick; it is a cool one!
I use it all the time on my Squidoo.com posts (http://squidoo.com/lensmasters/TxCowboyDancer)
However using that technique requires me to remember to do that at the bottom of every post and create the link manually. I was hoping to code something in using CSS that would auto-magically insert the “back to top” link for me whenever I create a new post.
-
I wanted a “back to top” button too, and simply created a widget for my sidebar. I found a graphic I liked, then with Add New Post, inserted the graphic and used the “backtotop” code as the URL link for the graphic. I copied the code in Text Editor, then inserted it in a Text Widget. I set the widget so it’s at the bottom of my sidebar, that way I didn’t have to add it to each post.
-
@infomomsaysok
That’s a very creative idea. If it turns out that I can’t do it via CSS I’ll use your technique. Thanks!
-
- The topic ‘Is it possible to use CSS to insert a back to top code?’ is closed to new replies.