Add CSS to E-Mail and Print

Forums Dynamic Forms for SharePoint Add CSS to E-Mail and Print

Viewing 4 reply threads
  • Author
    Posts
    • #25847
      becca
      Participant

      I want to include this button https://www.w3schools.com/code/tryit.asp?filename=G5005RT9TIHG in an email but it sends as the contents of style and the text of my button, and nothing else. How can I make the css work in the email?

    • #25851
      Alexander Bautz
      Keymaster

      In an email you cannot use style tag or script tag. You best bet is to style an anchor tag (<a> tag) with inline css in the style attribute and have href of this anchor tag link to a page in your site – possibly with an URL query string parameter you can pick up with code on the page to execute the function in this “landing page”.

      Alexander

    • #25853
      becca
      Participant

      I switched it to be inline but now I just get the button text :\

    • #25856
      becca
      Participant

      I got it to work as a link but the only styling it keeps is the text color, text size, and text background color. In w3school’s editor it looks correct though. I think I’ll have to change it to an image with a link, little bit of a bummer since I wanted the nice click function, but emails are not kind.

      Thanks for your help per usual

    • #25860
      Alexander Bautz
      Keymaster

      The problem is the rather limited support for CSS in email clients – if you Google it you will find a list of supported CSS code in different clients.

      Alexander

Viewing 4 reply threads
  • You must be logged in to reply to this topic.