How can we align text in list views to the center

christophosterm
Tera Contributor

Dear all,

Is it possible to align text in list views to the center?

In the example below I would like to align the values of Risk, Value and Size to the center.

find_real_file.png

Thanks for your help and best regards,

Christoph

1 ACCEPTED SOLUTION

Rohith Sabbinen
Mega Expert

Hi Christoph,



Please try this.



1. Right Click on the Field in the form Layout.


2. Configure Styles.


3. Create a new style.


4. In the Value: javascript:1==1;


4. in the Style: text-align: center;



The thing is the value field for the list view has to be something.   I'm not sure if its a bug or not, but if you put something like, "javascript:1==1" everything will evaluate it true.




Thanks,


Rohith


View solution in original post

5 REPLIES 5

Harish KM
Kilo Patron
Kilo Patron

Rohith Sabbinen
Mega Expert

Hi Christoph,



Please try this.



1. Right Click on the Field in the form Layout.


2. Configure Styles.


3. Create a new style.


4. In the Value: javascript:1==1;


4. in the Style: text-align: center;



The thing is the value field for the list view has to be something.   I'm not sure if its a bug or not, but if you put something like, "javascript:1==1" everything will evaluate it true.




Thanks,


Rohith


Hi @Rohith Sabbinen 

Please help with the similar issue mentioned in this post: https://www.servicenow.com/community/developer-forum/ui-issue-data-is-not-aligned-in-ui-under-the-co...

 

Thanks,

Anusha

How can I set column heading to align center