Search code examples
htmlcssemail-attachments

I want to give height and width to my anchor tag so that i can see height and width in outlook application on desktop or laptop


<a href=""><button>Confirm your info</button></a>

I had tried display:block or display;inline-block. But it does not applicable to email template . please provide inline css.

I had used

<a style="width: 200px;height: 43px;display:inline-block;background-color: #245fa2;color: white;">
    <button style="width: 200px;height: 43px;margin-bottom: 10px;background-color: #245fa2;color: white;font-size: 16px; border-color: #99cc33;border-radius: 5px;font-family: sans-serif,Arial,Helvetica;"></button>
</a>

Solution

  • Email styles are a pain.

    You have to revert back to old school HTML + tables for layout to support email. I don't think < button > will work.

    When i want a square block button that looks nice in an email, i'd write a small html table with width and height attributes with an < a > text aligned in the centre...

    <table><tr><td><a>some text</a></td></tr></table>
    

    Then style up the td and a inline.