0

So this is the HTML code i have: I want to make the button also clickable, because right now, only the text is clickable. I want to link the button to the anchor: "form" as well.

<div class="banner-header" style="text-align: center;">
<p class="button primary" style="font-family: Montserrat, sans-serif; font-style: normal; text-decoration: none; background-color: #ffffff; border: 1px solid #ffffff; border-radius: 50px; color: #ffffff; fill: #ffffff; font-size: 20px; padding: 12px 35px; text-transform: none;">
    <a style="color: #f36e5b; font-weight: bold; text-decoration: none;" href="#form" rel="nofollow noopener">Request Free Trial</a>
</p>
StudioTime
  • 22,603
  • 38
  • 120
  • 207
  • Welcome to stackoverflow! Your code isn't visible. Try embedding it as a snippet or enclose it in ` – MBaas Apr 05 '21 at 07:17
  • After the edit I have deleted my answer. I think your question is similar to https://stackoverflow.com/questions/796087/make-a-div-into-a-link I think this will give you some pointers. – Wasim Zarin Apr 05 '21 at 07:40

1 Answers1

0

You have written a custom button inside a <p> tag.
So, here you can add a cursor style to your button CSS along with other CSS styles, which you have written inside <p> tag.
Also when you add a click function, add it in <p> tag to make entire button clickable.

<p style="cursor: pointer" (click method/formsubmission behavior here)> 
  <a> Request Free Trial </a>
</p>
abhinav3414
  • 946
  • 3
  • 9
  • 31