简体   繁体   中英

CSS Not Being Applied To HTML Document When Email Is Received

I've been having some issues with styling when sending a document based on an HTML string. I have been primarily referencing this resource ( https://developers.docusign.com/esign-rest-api/guides/responsive-signing/creating-signable-html ), specifically the section at the bottom which details which HTML and CSS elements are supported by Docusign. Every element that I use is on these approved lists, yet the styling that I apply to the HTML string does not seem to make it through to the received email. In particular, any sort of padding that I apply seems to be completely ignored after going through Docusign's end. I have tried a variety of ways to apply padding, such as using percentages or em in my CSS and also using a style tag, external style sheet, and inline styling, yet none of these seem to work.

As a specific example, in the document I am trying to send, I often need to begin a section with a number, followed by a large space, followed by text. The HTML I use is something like this:

2. <span style='margin-left: 2em'></span> <b>Inventions.</b>

When rendering this HTML in a browser, I get this:

Desired Display

However, when receiving the document back from Docusign, it looks like this:

Actual Display

This seems to happen for just about all of my CSS leaving the received document looking very poor. I'm not sure what I'm missing here as these CSS elements should be supported by Docusign

Margin-Top not working for span element?

margin CSS property not allowed on span element.

Nothing to do with DocuSign.

You can push it right side in other ways (add blank space) or just use <p> or <div> instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM