Only the text within buttons is clickable
The CSS for buttons results in a nice, graphical button, but only the text is clickable. The rest of the button is just for looks. Here's one way to fix it:
table.button td a,
table.tiny-button td a,
table.small-button td a,
table.medium-button td a,
table.large-button td a {
display: block;
height: 100%;
width: 100%;
}
Making the a element expand to fill the td container results in a fully-clickable button.
I've been trying this out, it makes buttons that behave like buttons across most email clients, especially outlook
http://buttons.cm/
so far so good
Thank you! I noticed the same issue and your suggested code worked beautifully! This should be merged into the master.
Odd, I noticed that the official documentation has the suggested width and block settings added to the buttons, but the latest version of Ink v1.0.5 doesn't have the changes. So now the official documentation is inconsistent with the release.
Take out the padding from the button css so your button is the height of your text. Then in your button href css add:
line-height: 3.6em;
display: inline-block;
width: 100%;
Does anyone have any insight on how compatible this approach is? I've understood that Outlook doesn't deal too well with block-level links.
There are a number of ways that claim to work across clients, (like buttons.cm mentioned above, or this article from Litmus), but few of them are responsive. It would be fantastic if we could come up with a variation that could be made part of Ink.
@samglover for your solution --> :+1:
We've addressed the button issues in v2. We chose to pursue the hybrid approach of padding and borders, making the clickable area much larger. We're no longer supporting v1, however we're more than happy to merge a PR into the v1.0.0 branch!