Create a fixed call to action button that converts more leads

10/15/2022

To add a call to action button, you will need to add code to your website’s HTML.
In this article, we going to do that step by step.

Action: When someone clicks the button it will dial a phone call

Step 1 :

First, we have to add HTML tag. We can use “a” tag or “button” tag.
but here we are going to use “a” tag with class name of “btn-cp” & Button text as “Call me now”

  • You can replace “btn-cp” with your own class name (don’t forget to keep the same name in CSS part)
  • Replace your phone number in href section.
<a class="btn-cp" href="tel:+33777779955">Call me now</a>

Step 2 :

Now CSS style part :

I used black (#000) as background & white (#fff) as text colour.
& for hover animation black as text colour & yellow (#ffd448) as background.

This button will stay at the bottom right. ( you can change it by changing “bottom:1rem; & right:1rem”)

a.btn-cp{
 background:#000;
 text-decoration:none;
 color:#fff;
 padding: 0.5rem 1rem;
 border-radius:50px;
 position:fixed;
 bottom:1rem;
 right:1rem;
}

a.btn-cp:hover{
 background:#ffd448;
 color:#000;
}