How to decrease or increase the spacing between HTML elements in Custom Email Notification?
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
- SAP SuccessFactors Employee Central: Workflows
- SAP SuccessFactors Employee Central: Document Generation
There is currently no standard feature available from SuccessFactors to decrease or increase the spacing between HTML elements.
- But we can use the HTML source code option provided in system.
- Take back-up of the source code of the template you are going to modify.
- Please use HTML source code in document generation template and modify the paragraphs and photos as per few suggestions below:
- Add style=”display:block” to your images. This is the most popular fix for extra padding and space. However, it creates a line break before and after your image.
- Set the “Align” Attribute
If your image height is greater than 16px, set the image’s “align” attribute to any of the following:
It’s important to note that align=”baseline” and align=”bottom” do not work.
- Set Line-Height to 10px or Less
For this solution, simply place the image in a block element with a style=”line-height:10px” (or less).
- Set Font-Size to 2px or Less
Similar to the line-height solution, this fix places the image in a block element with a style=”font-size:2px” (or less). This is an option if you don’t have any text in the container.
- To remove space between paragraphs:
- margin : 0 : This will remove space between two paragraphs.
- padding : 0 : This will remove space between the border and text of each paragraph.
- line-height : 20px : This will decrease spacing between different lines in each paragraph.
decrease or increase the spacing between elements in Custom Email Notification, document generation, reduce extra space , KBA , LOD-SF-EC-WFL , Workflows (Rules & XML) , LOD-SF-EC-DOC , Document Generation , How To