After an outage on September 1, the Instructure Community is now fully available, including guides, release notes, forums, and groups. If some styling still looks unusual, clear your cache and cookies.
Found this content helpful? Log in or sign up to leave a like!
How does one integrate "Back to the top" icons on longer pages with several sections, so the viewer can jump right back to the table of contents?
Solved! Go to Solution.
Hi Andreas,
While I'm not super proficient with design, I was able to test out the following steps and it worked as designed in my instance of Canvas.
Open the page in Canvas where you want to add the "Back to the Top" functionality.
Click the "Edit" button.
In the bottom-right corner of the RCE, click the </>
button. This will open the HTML Editor.
Find the first line of code on your page. This is the code for your table of contents or the first element at the top.
Before this first line, add the following code:
<a id="top"></a>
This code creates an invisible anchor at the very top of your page with the ID "top." You can also use a div tag with an ID, like <div id="top"></div>
, but the anchor tag is a clean and common practice.
Scroll down to the end of a section in the HTML Editor.
Add the following code where you want your "Back to the Top" link to appear:
<p style="text-align: right;"><a href="#top">Back to the top ⬆️</a></p>
href="#top"
is the crucial part that links to the anchor you created in Step 1.
style="text-align: right;"
is optional, but it's a good way to position the link on the right side of the page to make it more prominent. You can change right
to center
or left
to suit your preference.
You can change the text "Back to the top ⬆️" to whatever you like.
Repeat this for every section where you want the link to appear.
Click the </>
button again to switch back to the regular RCE. You should now see the "Back to the top" link displayed on your page.
Click "Save".
Important Note: The reason this method works better is that Canvas is less likely to strip out id
attributes when they are embedded in the HTML source code directly. When you use the built-in RCE link creator, it sometimes creates an HTML structure that the editor's automatic cleaning process misinterprets and removes upon subsequent edits.
By working in the HTML Editor, you bypass this potential issue and create a reliable navigation feature for your students.
Hi Andreas,
While I'm not super proficient with design, I was able to test out the following steps and it worked as designed in my instance of Canvas.
Open the page in Canvas where you want to add the "Back to the Top" functionality.
Click the "Edit" button.
In the bottom-right corner of the RCE, click the </>
button. This will open the HTML Editor.
Find the first line of code on your page. This is the code for your table of contents or the first element at the top.
Before this first line, add the following code:
<a id="top"></a>
This code creates an invisible anchor at the very top of your page with the ID "top." You can also use a div tag with an ID, like <div id="top"></div>
, but the anchor tag is a clean and common practice.
Scroll down to the end of a section in the HTML Editor.
Add the following code where you want your "Back to the Top" link to appear:
<p style="text-align: right;"><a href="#top">Back to the top ⬆️</a></p>
href="#top"
is the crucial part that links to the anchor you created in Step 1.
style="text-align: right;"
is optional, but it's a good way to position the link on the right side of the page to make it more prominent. You can change right
to center
or left
to suit your preference.
You can change the text "Back to the top ⬆️" to whatever you like.
Repeat this for every section where you want the link to appear.
Click the </>
button again to switch back to the regular RCE. You should now see the "Back to the top" link displayed on your page.
Click "Save".
Important Note: The reason this method works better is that Canvas is less likely to strip out id
attributes when they are embedded in the HTML source code directly. When you use the built-in RCE link creator, it sometimes creates an HTML structure that the editor's automatic cleaning process misinterprets and removes upon subsequent edits.
By working in the HTML Editor, you bypass this potential issue and create a reliable navigation feature for your students.
Thanks, that's just what I needed, and it works well.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in