Can I Make a Button Scrollable on Hostinger? Easy 2026 Guide

Can I make a element button scrollable on Hostinger? Yes, you can. Hostinger Website Builder lets a button jump to any section on your page. This is called an anchor link. You can also add a back to top button, a sticky bar, smooth scrolling, and even a box with its own scrollbar.

Some of these are built in. Others need a small piece of code. This guide shows you every option, step by step. It also shows what Hostinger can’t do yet, so you don’t waste time.

Quick Answer: Yes. To make a button scroll to a section in Hostinger Website Builder:

  1. Click the section you want visitors to reach and open Edit section.
  2. Open the Anchor tab and type a name like #pricing.
  3. Click your button, open its settings, and pick Section in the Link to menu.
  4. Choose your anchor, then click Update to publish.

A floating “back to top” button or a scrollable box needs a little custom code. Both are covered below.

Can I Make a Element Button Scrollable on Hostinger? What It Really Means

People use the word “scrollable” in different ways. So first, find your goal in the table below. Then jump to the right part of this guide.

What You WantBuilt In?Where to Do ItDifficulty
Button jumps to a section on the same pageYesSection settings → Anchor, then button → Link to → SectionEasy
Back to top button at the end of the pageYesA button in the last section linked to the top sectionEasy
Floating back to top button that follows youNo, needs codeIntegrations → Custom codeMedium
Smooth scrolling instead of a jumpNo, needs one CSS lineIntegrations → Custom codeEasy
Bar that stays at the top of the siteYes“Add sticky bar” above the headerEasy
Box with its own scrollbarNo, needs codeEmbed code elementMedium
Button jumps to a section on another pagePartlyButton → URL with the page link plus the anchorEasy

Note: Hostinger now also calls its builder Hostinger AI Builder (manual mode). The steps in this guide work the same way in both.

How to Make a Button Scroll to a Section (Anchor Link)

This is the main way to make a button scrollable on Hostinger. Each section on your page can get a name. Your button then points to that name. When a visitor clicks, the page moves to that section.

Step 1: Give the Section an Anchor Name

  1. Open your site in Hostinger Website Builder.
  2. Click the section where visitors should land. For example, your pricing or contact section.
  3. Click Edit section in the small toolbar.
  4. Open the Anchor tab.
  5. Type a short name that starts with #, like #contact-form.
  6. Click outside the box to save it.

Anchor name rules: The name must start with #. Right after the #, it must start with a letter. So #pricing-plans works, but #1-pricing does not. Use small letters and hyphens. Don’t use spaces.

Step 2: Link Your Button to That Section

  1. Click the button you want to use. If you don’t have one, add a Button element from the Add elements panel.
  2. Click Edit button to open its settings.
  3. In the Link to menu, choose Section.
  4. Pick the anchor you made in Step 1.
  5. Click Update at the top right so the change goes live.

You can use the same anchor in other places too. It works in the navigation menu, in text links, and on images. This is the official method from Hostinger’s guide on linking to a section.

Step 3: Test It on the Live Site

Open your live website in a new tab. Click the button. The page should move to your chosen section. If nothing happens, check the problems section near the end of this guide.

How to Link a Button to a Section on Another Page

Sometimes your button is on the home page, but the section is on another page. In that case, use the full link with the anchor at the end.

  1. Add an anchor to the section on the other page, like #team.
  2. Copy that page’s web address, for example yoursite.com/about.
  3. Add the anchor to the end: yoursite.com/about#team.
  4. In your button settings, choose URL in the Link to menu and paste the full link.
  5. Update the site and test the button on the live page.

How to Add a Back to Top Button on Hostinger

A back to top button helps visitors on long pages. There are two ways to add one. The first is fully built in. The second floats on the screen and needs code.

Method 1: Built-In Back to Top Button (No Code)

  1. Click the first section of your page (usually the hero section).
  2. Open Edit section → Anchor and name it #top.
  3. Go to the last section of the page. Add a button and name it “Back to Top”.
  4. In the button settings, set Link to → Section and pick #top.
  5. Update your website.

This button stays in the last section. It does not follow the visitor while they scroll.

Method 2: Floating Back to Top Button (With Custom Code)

A floating button sits in the corner of the screen. It shows up after the visitor scrolls down. We could not find a built-in switch for this in Hostinger’s help docs, so you add it with custom code.

  1. In the builder, open the ⋯ (More) menu and click Integrations.
  2. Find the Custom code field.
  3. Paste the code below. If other code is already there, paste it underneath, not in the middle.
  4. Save and click Update.
<style>
#back-to-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: none;
  padding: 12px 16px;
  border: 0;
  border-radius: 50px;
  background: #0284c7;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
</style>
<script>
(function () {
  function addTopButton() {
    var btn = document.createElement('button');
    btn.id = 'back-to-top-btn';
    btn.type = 'button';
    btn.textContent = '↑ Top';
    btn.setAttribute('aria-label', 'Back to top');
    document.body.appendChild(btn);
    window.addEventListener('scroll', function () {
      btn.style.display = window.scrollY > 400 ? 'block' : 'none';
    });
    btn.addEventListener('click', function () {
      window.scrollTo({ top: 0, behavior: 'smooth' });
    });
  }
  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', addTopButton);
  } else {
    addTopButton();
  }
})();
</script>

You can change the color (#0284c7) and the text (↑ Top) to match your brand. The number 400 means the button shows after the visitor scrolls 400 pixels.

Important: Custom code does not show inside the editor. You will only see it in Preview mode or on the live site. Hostinger explains this in its custom code guide. If you don’t see a Custom code field, your plan may not include it. Ask Hostinger live chat to confirm.

How to Make Scrolling Smooth Instead of Jumpy

An anchor link may jump to the section in a split second. Some visitors find that confusing. A smooth scroll slides the page down instead. It looks more polished.

To turn it on, paste this short code into Integrations → Custom code:

<style>
html {
  scroll-behavior: smooth;
}
</style>

This uses a standard CSS rule called scroll-behavior. Modern browsers support it. If your site already scrolls smoothly, you don’t need this code.

How to Make a Button or Bar Stay on Screen (Sticky)

Maybe you want a button that stays visible while people scroll. Hostinger gives you one built-in option for this: the sticky bar.

  1. In the builder, click Add sticky bar at the top of the header section.
  2. Type your message, like “Free shipping this week”.
  3. Click Edit section to change the background color or height.
  4. Update your website.

The sticky bar sits above your navigation menu. It is good for short offers or notices. See Hostinger’s sticky bar guide for more details. For a floating button in the corner, use the custom code method above.

How to Make an Element Scrollable (A Box With Its Own Scrollbar)

Some people want a box that scrolls on its own. For example, a long list of terms, reviews, or a price list. The rest of the page stays still while the box scrolls.

The easiest way is to build the box inside an Embed code element:

  1. Open Add elements and drag the Embed code element onto your page.
  2. Click Enter code.
  3. Paste the code below and replace the sample text with your own.
  4. Click Embed code, resize the element, and update the site.
<div style="max-height: 300px; overflow-y: auto; padding: 16px; border: 1px solid #cbd5e1; border-radius: 10px; font-family: sans-serif; line-height: 1.6;">
  <p>Put your long text here.</p>
  <p>Add as many lines as you need.</p>
  <p>The box shows a scrollbar when the text is taller than 300px.</p>
</div>

Change 300px to make the box taller or shorter. The overflow-y: auto part adds the scrollbar only when it is needed.

Want to make a normal builder element scroll instead? You can target it with custom CSS. Hostinger shows how to find an element’s code with your browser’s Inspect tool in its guide on customizing your design with code. This method is harder, and the element names can change when you edit the page. For most people, the Embed code box is the safer choice.

Check Your Scroll Buttons on Mobile Too

Hostinger Website Builder has a separate editor for desktop and mobile. This lets you design each screen size on its own. It also means a button can look fine on a laptop but be hidden or moved on a phone.

Mobile checklist:

  • Switch to the mobile view in the builder after you add your button.
  • Make sure the button is visible and big enough to tap.
  • Open the live site on your phone and tap the button to test the scroll.
  • Check that a floating button doesn’t cover a chat widget or menu.

Hostinger’s troubleshooting guide also covers layout differences between mobile and desktop.

Using WordPress on Hostinger? Here Is How to Do It

Many Hostinger users run WordPress instead of the Website Builder. The idea is the same, but the steps are different.

  1. Open your page in the WordPress block editor.
  2. Click the block where visitors should land, like a Heading block.
  3. In the right sidebar, open Block → Advanced.
  4. Type a name in the HTML anchor box, like pricing (no # here).
  5. Click your Button block and set its link to #pricing.
  6. Update the page and test it.

Each anchor must be unique on the page. It cannot have spaces. You can read more in the official WordPress Page Jumps guide.

What You Can and Cannot Do on Hostinger

What you can do

  • Link a button to a section with the Anchor tab
  • Use the same anchor in the menu, text, and images
  • Add a back to top button in the last section
  • Add a sticky bar above the header
  • Add fade, slide, or scale animation to a button
  • Add a floating button and smooth scroll with custom code
  • Build a scrollable box with the Embed code element

What you cannot do

  • Use anchors in blog, slideshow, or store sections (not supported yet)
  • Turn on a floating back to top button without code
  • See custom code working inside the editor
  • Start an anchor name with a number
  • Change the mobile layout from the desktop editor

Pros and Cons of Scroll Buttons on Hostinger

Pros

  • Anchor links are built in and free to use
  • No coding needed for basic scroll buttons
  • Visitors find key sections faster
  • Great for one-page sites and landing pages
  • Works in buttons, menus, text, and images

Cons

  • No built-in floating back to top button
  • Anchors don’t work in blog, slideshow, or store sections yet
  • Custom code is hidden in the editor, so testing takes extra steps
  • Mobile and desktop layouts must be checked one by one

Common Problems and Easy Fixes

ProblemLikely CauseEasy Fix
Button does nothing when clickedWrong anchor name or site not updatedStart the name with # and a letter. Click Update. Test on the live site
Anchor option is missingYou are in a blog, slideshow, or store sectionAdd the anchor to a normal section right above or below it
Section hides behind the headerA fixed header covers the top of the sectionPut the anchor on the section just above, or add extra space at the top
Custom code doesn’t showCode only runs in Preview and on the live siteUpdate and refresh. If the site breaks, remove snippets and add them back one by one
Works on desktop, not on mobileButton is hidden or moved in the mobile editorOpen the mobile view, fix the button, and update again

Still setting up your site? See our guides on how to transfer a domain from GoDaddy to Hostinger and how to transfer a domain from Squarespace to Hostinger. Need nice button graphics? Read how to use Canva for beginners.

Final Verdict: Can You Make a Button Scrollable on Hostinger?

Yes, and the basic version takes about two minutes. Add an anchor to a section, then link your button to it. No code is needed for that.

For a floating button, smooth scrolling, or a scrollable box, paste the short codes from this guide. Always test on the live site and on your phone before you share the page.

Can I Make a Element Button Scrollable on Hostinger: FAQs

Can I make a element button scrollable on Hostinger without code?

Yes. A button that scrolls to a section needs no code. Add an anchor in the section settings, then link your button to that section. Only a floating button, smooth scrolling, or a scrollable box needs code.

Where is the Anchor setting in Hostinger Website Builder?

Click any section and choose Edit section. The Anchor tab is inside the section settings. Type a name that starts with # and a letter.

Does Hostinger have a built-in back to top button?

You can make one with a normal button linked to your top section. A floating button that follows the visitor needs custom code. This guide shares a ready code.

Why does my custom code not appear in the editor?

Hostinger only runs custom code in Preview mode and on the live site. The editor does not show it. Update your site and check the live page.

Can a button scroll to a section on a different page?

Yes. Add the anchor on the other page. Then set your button to a URL that ends with the anchor, like yoursite.com/about#team. Test it on the live site.

Can I use anchors in a Hostinger blog or store section?

Not yet. Hostinger says anchors are not supported in blog, slideshow, and store sections. Put the anchor on a normal section near them instead.

Do anchor links help SEO?

Anchor links mainly help visitors find content faster. A clear page structure makes your site easier to use. Learn more in our guide on how Google search ranking works.

Sources: Hostinger Help Center and WordPress.org documentation. Read next: how Google search ranking works.