- 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-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-14-2019 08:39 PM
Hi Abhishek Gardade,
Thank you for the detailed answer.
That doesn't really solve the problem as there are many tables and fields and I don't want to change them one-by-one.
I am looking for a way to make it the default behaviour and imeddiately inherited to all number types such as String type default style is left-alignment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 09:44 PM
Hi LG,
As far as I know, I think the only option to change the styling is as suggested by Abhishek.
As you can see, in list layout, all the cells have the class as "vt", and the styling is added as an attribute to the cell. So, we can't override that using any CSS, as we won't be finding any specific CSS selectors for integers. The HTML is rendered with that styling using ServiceNow's internal processing logic, and I guess it is not configurable.
Thanks,
Manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 10:38 PM
Hello LG,
for which tables and table fields you want to make such configurations?
You can write a Fix script or scheduled job to create new styles for specific fields and then update the alignment values for fields,
I recommend you to run this script per table.
Please mark answer as Correct if you found it as helpful.
Thanks,
Abhishek
Abhishek Gardade