<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Button to take a user to the top of the page in the Footer section in Blog, Website &amp; Page Publishing</title>
    <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217395#M16540</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/983348"&gt;@deepapatel&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as Interactive is a marketplace, you will need to create a child-theme first in order to be able to modify/extend it.&lt;/P&gt;
&lt;P&gt;Have you created a child theme of the interactive theme in the past and are you using it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, it will be a bit more work, but only a few clicks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Continue here, if you haven't created a child-theme yet:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Go to your &lt;A href="https://app-eu1.hubspot.com/l/design-manager" target="_blank" rel="noopener"&gt;Design Manager&lt;/A&gt;, find and open the "Interactive"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.53.00.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159894iF9AD94008179E0D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.53.00.png" alt="Bildschirmfoto 2025-10-28 um 23.53.00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once opened, it should look something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.54.20.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159896iBB130D0670B83025/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.54.20.png" alt="Bildschirmfoto 2025-10-28 um 23.54.20.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on File -&amp;gt; Create Child theme&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.55.03.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159897iEC37469DE6C277E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.55.03.png" alt="Bildschirmfoto 2025-10-28 um 23.55.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Put your individual information into the popup fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.55.45.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159898i9FF23134CF6A3142/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.55.45.png" alt="Bildschirmfoto 2025-10-28 um 23.55.45.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;all names are completely up to you, but note that they'll be visible in the source code.&lt;/P&gt;
&lt;P&gt;If you want to use several words, I recommend to replace "space" with a dash("-") or underscore("_") or just combine them like "thisIsMyCustomTheme". Spaces are not great in source code&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After clicking the "Create Child theme" button, you will see your child-theme setup.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.01.22.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159899i8C151D8AC6679DF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.01.22.png" alt="Bildschirmfoto 2025-10-29 um 00.01.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Contiune here if you have created a child-theme before:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Click on File and create a new folder called "js" (optional but recommended).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the folder shouldn't appear, try reloading the page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After you see the folder, right click it and select &lt;U&gt;New file in "js"&lt;/U&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the popup, select "Javascript"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.08.32.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159900i9A0F61F318710516/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.08.32.png" alt="Bildschirmfoto 2025-10-29 um 00.08.32.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; in the next step, give it the name "back-to-top"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.09.03.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159901i4F30963F99C8AF35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.09.03.png" alt="Bildschirmfoto 2025-10-29 um 00.09.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click "Create"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste the first code block I've shared in my previous reply into the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should look like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.11.31.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159902i60D4F88FAEE45706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.11.31.png" alt="Bildschirmfoto 2025-10-29 um 00.11.31.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to modify the code to your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 4:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.innerHTML = '↑'; 
// replace the ↑ with anything you'd like to display as the button text. Can be an icon, text, emoji... Important: keep the quotes&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 5:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.className = 'back-to-top';
// do not change unless you want to modify everything in the CSS&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 6:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.setAttribute('aria-label', 'Zurück nach oben');
// replace the 'Zurück nach oben' to something like 'Click here to get back to top'. This is for accessibility/screen-readers&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 12:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if (window.pageYOffset &amp;gt; 100) {
// replace the 100 with a number you'd like the button to appear. This is the scroll distance. In this example the button will appear once the user scrolls for more than 100px. Usually this number is set to something between 100 and 800&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click the Publish button in the right corner.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, create a new folder "css".&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Make sure it's on the same level as js and not a child folder.&lt;/U&gt; (You can right-click on your theme name in the top of the left sidebar and select "create folder")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right-click the folder, create a new file and select "CSS + HubL". Give it a name.&lt;/P&gt;
&lt;P&gt;Paste the second code block from my previous reply into it.&lt;/P&gt;
&lt;P&gt;It should look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.32.01.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159903i6D85E6458295A4B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.32.01.png" alt="Bildschirmfoto 2025-10-29 um 00.32.01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify it to your requirements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the theme variables for styling and replace all hardcoded values to automatically meet your theme settings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can be a bit fiddly, but you can check the theme-overrides.css from the original Interactive theme and copy some of the button settings over to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to deal with it, you can simply replace the hardcoded values, with your values for background-color, color, padding, border....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once happy, publish this file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last but not least, open the base.html of your child-theme.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Copy line 22 and replace line 26 with it.&lt;/LI&gt;
&lt;LI&gt;Right-click on the back-to-top.css file and select "copy public URL".&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;select everything in between the double quotes in line 26 and hit paste(CTRL/CMD+V).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_css(get_asset_url("{{ get_asset_url('/my-custom-theme/css/back-to-top.css') }}")) }}&lt;/LI-CODE&gt;
&lt;P&gt;^ This code won't work so it needs to be changed to&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_css(get_asset_url("/my-custom-theme/css/back-to-top.css")) }}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also - remove Line 24.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a new line after the &amp;lt;body&amp;gt; tag and put this code in:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="#" class="back-to-top"&amp;gt;&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Next:&lt;/P&gt;
&lt;P&gt;Right click the back-to-top.js file and copy the public URL of it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify the (should be around line 50)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_js(get_asset_url('../../js/main.js')) }}&lt;/LI-CODE&gt;
&lt;P&gt;as you did with the css so it will look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_js(get_asset_url('/my-custom-theme/js/back-to-top.js')) }}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save/publish this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final step is to open every page that the button should be visible on and changed from the interactive theme to your child-theme. (This is the main reason I always recommend to create a child-theme before even start building the first page)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2025 23:58:26 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2025-10-28T23:58:26Z</dc:date>
    <item>
      <title>Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1216927#M16523</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I want to add a Top button in the website page footer that takes a user back to the top. Can anyone please help me with what to add to a button to do that? I will appreciate that. Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 00:25:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1216927#M16523</guid>
      <dc:creator>deepapatel</dc:creator>
      <dc:date>2025-10-28T00:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1216998#M16528</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/983348"&gt;@deepapatel&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you need to add some JavaScript (to your main.js or as a seperate js file) like this one&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;// Back to top functionality
  function initBackToTop() {
    const backToTopButton = document.createElement('button');
    backToTopButton.innerHTML = '↑';
    backToTopButton.className = 'back-to-top';
    backToTopButton.setAttribute('aria-label', 'Zurück nach oben');
    
    document.body.appendChild(backToTopButton);
    
    // Show/hide button based on scroll position
    function toggleBackToTop() {
      if (window.pageYOffset &amp;gt; 100) {
        backToTopButton.classList.add('back-to-top--visible');
      } else {
        backToTopButton.classList.remove('back-to-top--visible');
      }
    }
    
    // Scroll to top function
    function scrollToTop() {
      window.scrollTo({
        top: 0,
        behavior: 'smooth'
      });
    }
    
    window.addEventListener('scroll', toggleBackToTop);
    backToTopButton.addEventListener('click', scrollToTop);
  }
  
  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', initBackToTop);
  } else {
    initBackToTop();
  }&lt;/LI-CODE&gt;
&lt;P&gt;and some CSS like&lt;/P&gt;
&lt;LI-CODE lang="css"&gt;/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: #007cba;
  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top:hover {
  background-color: #005a87;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 10px;
    right: 10px;
    font-size: 16px;
  }
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My personal recommendation is to create seperate files like back-to-top.js and back-to-top.css in the corresponding folders in your theme. Add the back-to-top.js below by adding&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;{{ require_js(get_asset_url('path/to/back-to-top.js')) }}&lt;/LI-CODE&gt;&lt;SPAN&gt;below the&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;{{ standard_footer_includes }} &lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;in your layout.html (or base.html) which should be located in templates/layout folder.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the back-to-top.css, add it to your main.css by using&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% include 'path/to/back-to-top.css' %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last but not least, add a&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="#" class="back-to-top"&amp;gt;&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to your layout.html (or base.html).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option would be to create a custom module with similar code and add the custom module to the layout.html (or base.html; what ever it's called in your case)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p.s.:&lt;BR /&gt;Feel free to modify the css with some theme variables&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 07:52:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1216998#M16528</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-10-28T07:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217361#M16537</link>
      <description>&lt;P&gt;Anton, I am not a developer, so I don't know how to do this. Is there a step-by-step instruction on how I can create this? I can follow instructions. I am using the Interactive theme.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 22:07:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217361#M16537</guid>
      <dc:creator>deepapatel</dc:creator>
      <dc:date>2025-10-28T22:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217383#M16539</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/983348"&gt;@deepapatel&lt;/a&gt;&lt;/SPAN&gt; - thank you for this context.&lt;BR /&gt;&lt;BR /&gt;I'm re-tagging &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; for better visibility!&lt;BR /&gt;&lt;BR /&gt;Shane, Senior Community Moderator&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 23:21:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217383#M16539</guid>
      <dc:creator>STierney</dc:creator>
      <dc:date>2025-10-28T23:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217395#M16540</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/983348"&gt;@deepapatel&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as Interactive is a marketplace, you will need to create a child-theme first in order to be able to modify/extend it.&lt;/P&gt;
&lt;P&gt;Have you created a child theme of the interactive theme in the past and are you using it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, it will be a bit more work, but only a few clicks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Continue here, if you haven't created a child-theme yet:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Go to your &lt;A href="https://app-eu1.hubspot.com/l/design-manager" target="_blank" rel="noopener"&gt;Design Manager&lt;/A&gt;, find and open the "Interactive"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.53.00.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159894iF9AD94008179E0D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.53.00.png" alt="Bildschirmfoto 2025-10-28 um 23.53.00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once opened, it should look something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.54.20.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159896iBB130D0670B83025/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.54.20.png" alt="Bildschirmfoto 2025-10-28 um 23.54.20.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on File -&amp;gt; Create Child theme&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.55.03.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159897iEC37469DE6C277E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.55.03.png" alt="Bildschirmfoto 2025-10-28 um 23.55.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Put your individual information into the popup fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-28 um 23.55.45.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159898i9FF23134CF6A3142/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-28 um 23.55.45.png" alt="Bildschirmfoto 2025-10-28 um 23.55.45.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;all names are completely up to you, but note that they'll be visible in the source code.&lt;/P&gt;
&lt;P&gt;If you want to use several words, I recommend to replace "space" with a dash("-") or underscore("_") or just combine them like "thisIsMyCustomTheme". Spaces are not great in source code&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After clicking the "Create Child theme" button, you will see your child-theme setup.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.01.22.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159899i8C151D8AC6679DF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.01.22.png" alt="Bildschirmfoto 2025-10-29 um 00.01.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Contiune here if you have created a child-theme before:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Click on File and create a new folder called "js" (optional but recommended).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the folder shouldn't appear, try reloading the page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After you see the folder, right click it and select &lt;U&gt;New file in "js"&lt;/U&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the popup, select "Javascript"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.08.32.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159900i9A0F61F318710516/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.08.32.png" alt="Bildschirmfoto 2025-10-29 um 00.08.32.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; in the next step, give it the name "back-to-top"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.09.03.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159901i4F30963F99C8AF35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.09.03.png" alt="Bildschirmfoto 2025-10-29 um 00.09.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click "Create"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste the first code block I've shared in my previous reply into the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should look like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.11.31.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159902i60D4F88FAEE45706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.11.31.png" alt="Bildschirmfoto 2025-10-29 um 00.11.31.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to modify the code to your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 4:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.innerHTML = '↑'; 
// replace the ↑ with anything you'd like to display as the button text. Can be an icon, text, emoji... Important: keep the quotes&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 5:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.className = 'back-to-top';
// do not change unless you want to modify everything in the CSS&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 6:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;backToTopButton.setAttribute('aria-label', 'Zurück nach oben');
// replace the 'Zurück nach oben' to something like 'Click here to get back to top'. This is for accessibility/screen-readers&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 12:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if (window.pageYOffset &amp;gt; 100) {
// replace the 100 with a number you'd like the button to appear. This is the scroll distance. In this example the button will appear once the user scrolls for more than 100px. Usually this number is set to something between 100 and 800&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click the Publish button in the right corner.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, create a new folder "css".&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Make sure it's on the same level as js and not a child folder.&lt;/U&gt; (You can right-click on your theme name in the top of the left sidebar and select "create folder")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right-click the folder, create a new file and select "CSS + HubL". Give it a name.&lt;/P&gt;
&lt;P&gt;Paste the second code block from my previous reply into it.&lt;/P&gt;
&lt;P&gt;It should look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2025-10-29 um 00.32.01.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/159903i6D85E6458295A4B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2025-10-29 um 00.32.01.png" alt="Bildschirmfoto 2025-10-29 um 00.32.01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify it to your requirements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the theme variables for styling and replace all hardcoded values to automatically meet your theme settings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can be a bit fiddly, but you can check the theme-overrides.css from the original Interactive theme and copy some of the button settings over to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to deal with it, you can simply replace the hardcoded values, with your values for background-color, color, padding, border....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once happy, publish this file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last but not least, open the base.html of your child-theme.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Copy line 22 and replace line 26 with it.&lt;/LI&gt;
&lt;LI&gt;Right-click on the back-to-top.css file and select "copy public URL".&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;select everything in between the double quotes in line 26 and hit paste(CTRL/CMD+V).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_css(get_asset_url("{{ get_asset_url('/my-custom-theme/css/back-to-top.css') }}")) }}&lt;/LI-CODE&gt;
&lt;P&gt;^ This code won't work so it needs to be changed to&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_css(get_asset_url("/my-custom-theme/css/back-to-top.css")) }}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also - remove Line 24.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a new line after the &amp;lt;body&amp;gt; tag and put this code in:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="#" class="back-to-top"&amp;gt;&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Next:&lt;/P&gt;
&lt;P&gt;Right click the back-to-top.js file and copy the public URL of it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify the (should be around line 50)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_js(get_asset_url('../../js/main.js')) }}&lt;/LI-CODE&gt;
&lt;P&gt;as you did with the css so it will look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_js(get_asset_url('/my-custom-theme/js/back-to-top.js')) }}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save/publish this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final step is to open every page that the button should be visible on and changed from the interactive theme to your child-theme. (This is the main reason I always recommend to create a child-theme before even start building the first page)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 23:58:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217395#M16540</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-10-28T23:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Button to take a user to the top of the page in the Footer section</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217710#M16545</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/756167"&gt;@STierney&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is the solution I found, and it works well. I added this code directly to the website's footer HTML. I hope this helps others. BTW, I can't expand this text window.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN&gt;Adding a "Back to Top" Button to Every Page on HubSpot&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This guide provides the complete HTML, CSS, and JavaScript code needed to implement a fixed, scrolling "Back to Top" arrow button on your HubSpot website using the Interactive theme. Placing this code in your Site Footer HTML will appear on all pages, blog posts, and landing pages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;1. The Code Block&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Copy the entire block of code below. This single script contains the button element, its styling (CSS), and the functionality (JavaScript) to handle scrolling and showing/hiding the button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note: The styling uses a fixed position in the bottom-right corner.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;Code in Footer&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;!-- START: Back to Top Button Implementation --&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#backToTopBtn {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;display: none; /* Hidden by default */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;position: fixed; /* Fixed position */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bottom: 20px; /* Place the button 20px from the bottom */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;right: 30px; /* Place the button 30px from the right */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;z-index: 99; /* Make sure it stays on top of other elements */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border: none; /* Remove border */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;outline: none; /* Remove outline */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color: black; /* Button background color */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color: #6cca0b; /* Updated to the new bright green arrow color */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cursor: pointer; /* Add a mouse pointer on hover */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding: 15px; /* Some padding */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border-radius: 50%; /* Make it round */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size: 25px; /* Increased font size for a slightly larger arrow */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;line-height: 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;transition: background-color 0.3s, transform 0.2s;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Responsive sizing */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: 50px;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: 50px;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#backToTopBtn:hover {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color: #333333; /* Dark gray for hover on black background */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;transform: scale(1.05);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;!-- The Button HTML Element (Arrow Up/Carrot) --&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;button onclick="scrollToTop()" id="backToTopBtn" aria-label="Go to top"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;#8593; &amp;lt;!-- Changed to Black Up-Pointing Triangle (a common 'carrot' style) --&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/button&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Get the button element&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;const backToTopBtn = document.getElementById("backToTopBtn");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Function to scroll the document to the top smoothly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function scrollToTop() {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Use smooth scrolling if supported, otherwise fall back to immediate scroll&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;window.scrollTo({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;top: 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;behavior: "smooth"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// When the user scrolls down 300px from the top of the document, show the button&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;window.onscroll = function() {scrollFunction()};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function scrollFunction() {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Check both documentElement (for most browsers) and body (for older ones)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (document.body.scrollTop &amp;gt; 300 || document.documentElement.scrollTop &amp;gt; 300) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;backToTopBtn.style.display = "block";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;backToTopBtn.style.display = "none";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Attach the globally defined function to the window object so it's accessible from the onclick attribute window.scrollToTop = scrollToTop;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;!-- END: Back to Top Button Implementation --&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;End Code in Footer&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;2. Implementation Steps in HubSpot&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Navigate to Settings: In your HubSpot portal, click the Settings icon (gear) in the main navigation bar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Go to Website &amp;gt; Pages: In the left sidebar navigation, expand the "Website" section and click on Pages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Find the Templates Tab: At the top of the screen, click the Templates tab.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Edit Site Footer HTML: Scroll down to the Site Footer HTML section.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Paste the Code: Paste the entire code block you copied from Step 1 into the text area of the Site Footer HTML section.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Save Changes: Scroll to the bottom and click the Save button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why the Footer HTML?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Placing this code in the Site Footer HTML ensures that it is loaded right before the closing &amp;lt;/body&amp;gt; tag on every single page served by HubSpot (including all blog posts and landing pages associated with your chosen domain), making it the perfect global solution for the Interactive theme.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;3. Testing and Customization&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Test: Go to any page on your live website, scroll down past the top section, and the circular black button with the bright green (#6cca0b) carrot arrow should appear in the bottom right corner. Clicking it should smoothly scroll you back to the top.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Customization: If you want to change the look, you can easily modify the CSS within the &amp;lt;style&amp;gt; tags in the code block.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN&gt;Future Customization Instructions&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To adjust the three elements look for the following lines within the code block in your Site Footer HTML:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Feature to Change&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Section in Code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Property/Value to Edit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Arrow/Carrot Character&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;button&amp;gt; HTML Element&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;amp;#x25B2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Change this HTML entity to a different symbol. Common alternatives are: ^ (simple caret), &amp;amp;#8657; (double up arrow), or &amp;amp;#8679; (the original thick arrow).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Arrow/Carrot Color&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#backToTopBtn CSS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;color: #6cca0b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Replace #6cca0b with any desired hex code or color name (e.g., red, blue).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Arrow/Carrot Size&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#backToTopBtn CSS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;font-size: 30px;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can increase or decrease the pixel value (30px) to change the size of the arrow symbol inside the button.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2025 17:08:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Button-to-take-a-user-to-the-top-of-the-page-in-the-Footer/m-p/1217710#M16545</guid>
      <dc:creator>deepapatel</dc:creator>
      <dc:date>2025-10-29T17:08:26Z</dc:date>
    </item>
  </channel>
</rss>

