- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 03:00 AM
Hi.
Is there a way to edit / apply a css stylesheet to all knowledge articles in a knowledge base?
For example, we would like to have a border around all our images used in KB articles, and so far we have been adding these manually via picture editing software which is a tedious and time consuming task, and especially if the images needs to be resized afterwards.
I've found the following that talks a little about it ( How to change the CSS for Knowledge Articles - Support and Troubleshooting (servicenow.com) ).
But since I do not have admin access to look around and fiddle with this in our ServiceNow instances and our ServiceNow admin team is very pressured with tasks I would like to know exactly where to find and edit / add a css stylesheet that can be applied to all knowledge article so that by default all images have a 2pixel colored border added on them. (both existing and new articles).
Is this even possible and can you point me to where to find and edit this so that I can send the request to our internal ServiceNow team fully documented on where and how to change this.
Example of what it looks like:
Solved! Go to Solution.
- Labels:
-
css
-
knowledge article
-
stylesheets

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 12:21 PM
Hi @MOKRA: There is a CSS file on the backend that can be updated. You just need to add something like the following to the stylesheet.
img {
border: 1px solid #000;
}
See How to change the CSS for Knowledge Articles.
Then, alternatively, if you have an image in an article where you don't want a border, you just place "0" in the Insert/Edit image > Advanced > Border width field.
Hope this helps!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:49 AM
Hi @MOKRA,
Are you using the backend for your knowledge bases, or just a Service Portal?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 11:56 PM
We are using both backend and portal also

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 12:21 PM
Hi @MOKRA: There is a CSS file on the backend that can be updated. You just need to add something like the following to the stylesheet.
img {
border: 1px solid #000;
}
See How to change the CSS for Knowledge Articles.
Then, alternatively, if you have an image in an article where you don't want a border, you just place "0" in the Insert/Edit image > Advanced > Border width field.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 11:58 PM
Do you by any chance now where this CSS file is located and if it will affect both backend and frontend/portal?