3

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

  • Docusign clearly filters your html, that's why they have this whitelist, and it would not surprise me if they remove empty html elements in the process. Can you try adding the style='margin-left: 2em' on the tag? – Willem Jun 18 '20 at 23:23
  • That seems reasonable so maybe the example I gave with an empty span wasn't the best example I could've used. The issue is, however, that not just this instance of CSS isn't applied, but all of the CSS I use. For example, in my document I often use CSS on div tags, which are not empty, to space out different sections. This CSS also isn't applied, so I don't think my issue is due to empty html elements. – Nick Shaughnessy Jun 18 '20 at 23:29

1 Answers1

0

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.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • I wasn't aware of this, strange that it renders fine in my browser then. But this isn't just an issue I encounter when putting margins on spans -- that was just an example -- it occurs for all of the CSS I put into my HTML document – Nick Shaughnessy Jun 19 '20 at 00:02
  • then you probably don't have the responsive signing feature enable or not using it correctly. One quick test - resize the signing page and see if the elements in the page resize like an HTML page or like PDF (responsive or not, PDF just shows you part of the image) – Inbar Gazit Jun 19 '20 at 17:09