- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2019 09:08 PM
Hi,
My question is: how do I enforce all the int/decimal in ServiceNow server-side tables and fields to align left?
I noticed all the input fields of type number (int, decimal…) in ServiceNow server-sides are aligned to the right, while the text fields are aligned to the left.
When inspecting the page, the Variables table cells had a class-name of “vt”, while the Configuration fields were of class “decimal form-control”.
The cells under Order were of class “vt” and had their style specifically set to “text-align: right”, while the cells under Question, Field and Type did not have their style specified:
The “decimal form-control” class was only for decimal numbers, and not for other input types:
Could you please help me to find out me where “vt” elements get their styling from, and how I can enforce all the numbers of both classes to align to the left?
Many thanks!
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2019 12:59 AM
Hello LG,
I have same requirement but for another table: Check out the below screenshots,
1. right click between column, click on configure ALL.
2. Go to Styles and click on new as below:
3. Create new style as below:
Please mark answer as Correct if you found it as helpful.
Thanks,
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 10:52 PM
Hi Abhishek,
Thank you for your reply.
I want to change it for all the number fields in all the tables in ServiceNow, as we will never want them aligned to the right (such as we won't want the String fields aligned to the right. I just don't find the sense why ServiceNow made it the default style in the first place).
Fix scripts sounds like a good idea. How do I access a table's properties using server script? GlideRecord returns the records themselves and not the properties (such as the Order property and its style) and document.getElementById() only works in client side?
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2021 08:24 AM
I see this solution all over, however it does not appear to work on read only fields. I've seen a few posts, but so far no answer.
Any thoughts?