Reduce spacing between variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2024 02:38 AM - edited ‎08-24-2024 02:55 AM
Hi experts, I need your help. I created a rich text label variable and a checkbox variable in a Catalog item, and I want to reduce the spacing between them. How can I do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2024 04:40 AM
Hello @mrreddy534 ,
Can you try below steps & let me know if it helps?
To reduce the spacing between two variables on a ServiceNow Record Producer, you can use CSS styles to adjust the margin or padding of the elements that contain the variables.
Here's an example of how you can use CSS styles to reduce the spacing between a rich text label variable and a multiline text variable:
Open the record producer that contains the two variables that you want to adjust the spacing for.
Click on the "Variables" related list to see a list of all the variables on the record producer.
Locate the variable that you want to reduce the spacing after (in this case, the rich text label variable).
Click on the variable's name to open the variable form.
In the "Attributes" section, add a new attribute called "Container CSS Style" with a value of "margin-bottom: 0;". This will remove the default bottom margin of the container element that holds the rich text label variable.
Click "Update" to save the changes to the variable.
Repeat steps 3-6 for the variable that you want to reduce the spacing before (in this case, the multiline text variable), but use "margin-top: 0;" instead of "margin-bottom: 0;" to remove the top margin of its container element.
If my response helps you in any way, kindly mark this as Accepted Solution/Helpful and help in closing this thread.
Regards,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2024 04:58 AM
Hi @ShubhamGarg thanks for your response, for rich text variable there is no attributes section showing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2024 10:13 AM
Have you found the solution ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2025 10:54 PM
You can use inline CSS on rich text label
<p style="margin: -15px 30px -40px !important; padding: 0px !important; position: absolute !important;"><em>label</em></p>