I styled some buttons with CSS, but now I want to add links to all of them. I've attempted using JavaScript to change the <button>
tag to <input>
, and also tried adding an onclick event in CSS like <button onclick="href">
, but none of these methods seem to be working.
Here is an example HTML code for one of the buttons
<th>
<button class="img" type="button8">
<p class="single"> HR
<br/> </p></button> </th>
and here is the corresponding CSS style
[type=button8] {
margin-top: 5px;
marring-left: 5px;
padding-left: 10px;
width: 260px;
height: 155px;
background: url('https://share.novartis.net/sites/ruphoncology/Shared%20Documents/00778_300dpi_RGB.jpg');
background-size: cover;
background-position: center;
text-color: black; }
I am looking to have the buttons redirect users to another page when clicked. P.S This is all done on SharePoint Online using WebPart Editor