Articles on: Blogs

How to add a call to action button in a blog post (In blog CTA)

1. Just copy following code and add it to the "raw html" block








<div class="uni-cta">

  <h2>Your Title Here</h2>
  <a href="https://unicornplatform.com/" class="uni-button">Call to Action</a>
</div>

<style>
.uni-button {
   display: inline-block;
   font-weight: 400;
   text-align: center;
   white-space: nowrap;
   vertical-align: middle;
   user-select: none;
   border: 1px solid transparent;
   padding: .375rem .75rem;
   font-size: 1rem;
   line-height: 1.5;
   border-radius: .25rem;
   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
   color: #fff !important;
   background-color: #007bff;
   border-color: #007bff;
   text-decoration: none !important;
}

.uni-button:hover {
   background-color: #0069d9;
   border-color: #0062cc;
}

.uni-cta {
   white-space: normal;
   text-align: center;
   margin-bottom: 0.7em;
   margin-top: 0.7em;
}
</style>

Updated on: 01/02/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!