What is a floating call-to-action button?
A floating call-to-action button is a link or button that stays visible as the visitor scrolls. It is usually built with CSS fixed positioning, so the button is positioned relative to the viewport instead of sitting inside the normal page flow.
The pattern works best for one clear action: book a call, start a trial, buy now, call us, get a quote, or message on WhatsApp. It is not a replacement for strong page copy. It is the always-available exit ramp once the visitor is ready to act.
Why do floating CTAs work?
They reduce the effort between intent and action. If someone finishes a pricing section, testimonial, service description, or long article and wants to act, the button is already there.
This is a usability argument, not magic conversion math. Fitts's Law in UX says larger and closer targets are faster to acquire. A persistent CTA gives the visitor a repeated, predictable target instead of making them scan for the next button.
When should you use one?
Use a floating CTA when one action matters more than everything else on the page. Good candidates include appointment booking, quote requests, trial signup, phone calls, checkout links, and WhatsApp chat.
Avoid it when the page has multiple equally important paths, when the action needs more explanation, or when existing overlays already compete for the same screen space. A floating CTA plus a cookie banner plus a chat widget can turn the bottom of a mobile screen into a traffic jam.
Best and worst use cases for floating CTAs
| Use case | Good fit? | Why |
|---|---|---|
| Book a call | Yes | High-intent action that should stay easy to reach |
| Call now | Yes | Especially useful on mobile service-business pages |
| Buy now | Yes | Works when the product and price are already clear |
| Learn more | Usually no | Low-intent actions rarely deserve persistent screen space |
| Multiple competing offers | Usually no | The button loses power when it has to represent too many choices |
Where should the floating CTA go?
Bottom-right is the safest desktop default because visitors expect persistent chat, help, and action widgets there. On mobile, bottom-right still works, but bottom-center can be easier to tap if the button is wide.
The placement rule is simple: visible, reachable, and not blocking content. Test it against cookie banners, live chat bubbles, accessibility widgets, mobile browser bars, and checkout drawers before publishing.
How large should the button be?
Make the touch target large enough to tap without precision. The WCAG target size guidance for enhanced accessibility recommends custom pointer targets of at least 44 by 44 CSS pixels, with exceptions. That is a useful practical minimum for floating CTA buttons because they are often tapped on phones.
For most sites, a button height of 48-56px with 16-24px horizontal padding is a good starting range. Icon-only buttons need extra care because the visible icon can look large while the real clickable area is too small.
What should the button say?
Use text that names the action and the outcome. "Book a Call" is clearer than "Start Now" if the click opens a calendar. "Get Quote" is clearer than "Submit" if the click starts a request form.
Good labels are short, specific, and honest:
- Book a Call
- Get a Quote
- Start Free Trial
- Call Now
- Chat on WhatsApp
- Buy Now
Do not use a floating CTA to overpromise. If the next screen asks for five form fields, the button should not say "Instant Quote" unless the quote really appears instantly.
Which colors work best?
Contrast beats color folklore. There is no universal CTA color that always wins. The button needs to stand out from the page, match the brand closely enough to feel intentional, and keep the text readable.
Use the WCAG contrast minimum as the floor: normal text should meet a 4.5:1 contrast ratio against its background. If your brand color fails that check with white text, use darker text, darken the brand color, or add a high-contrast outline.
Should a floating CTA be animated?
A small entrance animation or hover state can help visitors notice the button. Continuous shaking, flashing, or bouncing usually creates the wrong kind of attention.
If you animate, keep it short and respectful. Also support reduced-motion preferences in your CSS if the animation is more than a simple hover change. The goal is confidence, not alarm.
How do you add a floating CTA to a website?
The lightest method is to generate or write a small HTML and CSS snippet, then paste it near the end of the page body. CTA Button Generator gives you a visual editor for text, link, color, icon, position, radius, shadow, and animation, then exports the code.
Basic example:
<a href="https://your-link.com" class="floating-cta">Book a Call</a>
<style>
.floating-cta {
position: fixed;
right: 24px;
bottom: 24px;
z-index: 9999;
min-height: 48px;
padding: 14px 22px;
border-radius: 999px;
background: #2563eb;
color: #fff;
font: 700 16px/1.2 system-ui, sans-serif;
text-decoration: none;
box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}
</style>What mistakes should you avoid?
The most common mistake is making the button persistent but vague. A floating button earns screen space only when it gives the visitor a clear next step.
Avoid these patterns:
- Low-contrast text
- Tiny icon-only buttons
- Buttons that overlap consent banners
- Two or three floating widgets competing for the same corner
- A button that links to a generic homepage or contact page instead of the promised action
- Heavy widget scripts for a CTA that could be plain HTML and CSS
Ready to build your button?
Design it visually, export clean code, and paste it into your site.
Open the GeneratorFrequently Asked Questions
Should a floating CTA appear on every page?
Only if the action is relevant site-wide. A phone or booking button may belong everywhere on a service site. A product-specific checkout CTA should usually stay on product or offer pages.
Do floating CTAs hurt SEO?
Not by default. The bigger SEO risk is indirect: heavy scripts, intrusive overlays, layout shifts, or a bad mobile experience. A lightweight, non-blocking CTA is usually safe.
Can I have more than one floating button?
You can, but it gets noisy fast. If you need multiple actions, use one expandable menu or pick the highest-intent action for the floating button.
Sources and contextual notes
- CSS fixed positioning: MDN explains that fixed-position elements are positioned relative to the viewport, which is the CSS behavior behind floating CTA buttons.
- scroll attention research: Nielsen Norman Group found that users still spend disproportionate viewing time near the top of pages, which supports keeping important actions easy to reach.
- Fitts's Law in UX: NN/g summarizes the UX principle that larger, closer targets are faster to acquire, which supports larger, consistently placed CTA controls.
- WCAG target size guidance: WCAG 2.5.5 Target Size (Enhanced) recommends custom pointer targets of at least 44 by 44 CSS pixels, with listed exceptions.
- WCAG contrast minimum: WCAG 1.4.3 requires a 4.5:1 contrast ratio for normal text, with a 3:1 threshold for large text.
- Google Web Vitals: Google's Web Vitals documentation identifies loading, interactivity, and visual stability as user-experience metrics site owners should monitor.
- Interaction to Next Paint: web.dev describes INP as a Core Web Vital that measures page responsiveness to user interactions.
- optimize poor INP caused by JavaScript: web.dev's INP optimization guide covers JavaScript, long tasks, input delay, and main-thread work as causes of poor responsiveness.