Hey everyone! I am using this code section for an HTML template to create a button. While the button appears, it isn't clickable, and there isn't a space to add to the website. This is beyond my basic HTML ability.
Can you assist in making the button clickable and go to a website?
Here is the code:
<table style="font-family: 'Open Sans',sans-serif;" role="presentation" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="v-container-padding-padding" style="overflow-wrap: break-word; word-break: break-word; padding: 10px; font-family: 'Open Sans',sans-serif;" align="left"><!-- [if mso]><style>.v-button {background: transparent !important;}</style><![endif]-->
<div align="center"><!-- [if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="" style="height:38px; v-text-anchor:middle; width:128px;" arcsize="10.5%" stroke="f" fillcolor="#253e85"><w:anchorlock/><center style="color:#FFFFFF;font-family:'Open Sans',sans-serif;"><![endif]--> <a class="v-button" style="box-sizing: border-box; display: inline-block; font-family: arial,helvetica,sans-serif; text-decoration: none; -webkit-text-size-adjust: none; text-align: center; color: #ffffff; background-color: #253e85; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; width: auto; max-width: 100%; overflow-wrap: break-word; word-break: break-word; word-wrap: break-word; mso-border-alt: none; font-size: 15px;" target="_blank" rel="noopener"> <span style="display: block; padding: 10px 20px; line-height: 120%;"><span style="line-height: 18px;">Call to Action</span></span> </a> <!-- [if mso]></center></v:roundrect><![endif]--></div>
</td>
</tr>
</tbody>
</table>
. Can you assist in making the button clickable and go to a website?
I will refrain from making any comments about your code
but just point out that to make the a element cliickable
requires the addition of an attribute similar to this..CODEhref="https://example.com"
. Can you assist in making the button clickable and go to a website?
I will refrain from making any comments about your code
but just point out that to make the a element cliickable
requires the addition of an attribute similar to this..CODEhref="https://example.com"
. Thanks for the post. I have used href= before; just
. not sure where to place it in this section of code.
Assuming that you are coding for an email, then this would suffice..CODE
<table width="100%">
<tbody>
<tr>
<td align="center">
<a href="https://www.example.com"
style="display: inline-block;
padding: 10px 20px;
margin: 10px;
border-radius: 4px;
line-height: 18px;
background-color: #253e85;
font-family: arial,helvetica,sans-serif;
font-size: 15px;
color: #fff;
text-decoration: none"
target="_blank">Call to Action
</a>
</td>
</tr>
</tbody>
</table>
. Thanks for the post. I have used href= before; just
. not sure where to place it in this section of code.
Assuming that you are coding for an email, then this would suffice..CODE
<table width="100%">
<tbody>
<tr>
<td align="center">
<a href="https://www.example.com"
style="display: inline-block;
padding: 10px 20px;
margin: 10px;
border-radius: 4px;
line-height: 18px;
background-color: #253e85;
font-family: arial,helvetica,sans-serif;
font-size: 15px;
color: #fff;
text-decoration: none"
target="_blank">Call to Action
</a>
</td>
</tr>
</tbody>
</table>
No problem, you're very welcome.
A funny thing about Office HTML. It's meant to cater to IE, but more often than not IE is the browser it doesn't work in...
And IE is pretty much dead now which adds to the pointlessness.
Just to show what we're all talking about in how bad Microsoft's markup is...
This is roughly ALL the markup you should have.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)