Weird table formatting in knowledge template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 05:17 AM
Hi All,
Since last week, every time I'm trying to paste a table to the html editor in a knowledge template, random horizontal borders gets thicker. I've tried editing the source code, removing the formatting and playing with the table properties, creating a table in ServiceNow first and them insert the rows from Word, but nothing helps. Comparing to tables published previously, it seems the table type changes along the way, but I don't know how because I've been doing this the same way all the time.
I know I could create a table in ServiceNow from scratch, but that is not an option as the tables need to be formatted according to the company standards.
Has anyone been experiencing a similar issue and maybe knows what and how happens?
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 07:28 AM
When I paste in an empty table from Word I see something similar.
The pasted table has the style
border-collapse: collapse;
This means that where 2 borders meet, they are rendered as one.
Various cells have border properties such as:
border: 1pt solid windowtext;
This would render a border all the way round, if not overridden by certain adjacent cells with properties like:
border-top: none;
You can see this by clicking on a cell, then in the editor go to Table > Cell > Cell properties > Advanced Tab and look at the Style field.
Of course, no one wants to click on every cell, go to the menu and clear out the style...
I found I could get something that looks ok if I did the following:
- In Word untick all of the Table Style Options (Header Row, First Column etc) under the Table Design tab
- Display all borders
- Paste into ServiceNow
- Go to Table > Table Properties > Advanced and dele "border-collapse: collapse;", leaving just "border: none;"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 10:06 AM
Thanks Sam. I was able to remove the bold lines when editing the article using your instructions, but strangely, they still appear when previewing, and on the published version.
That said, your tips have suggested a way of adjusting the cell and border style to work around the issue, so still very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 07:10 AM
Hi Karolina,
I use a lot of tables in my KBAs. I believe it has to do with your table tag lines.
I suggest you first check the <table tag line. It should be similar to this: <table border="1" width="100%" cellspacing="0" cellpadding="0">.* Note: setting the width to 100% is optional. I use that so the table will take up the whole visible space and adjusts to the size of the reader's screen automatically. Setting the border to "1" means it is a solid line. The other two elements can also be changed for a different style of table.
Using the <table tag line will apply the border setting to the whole table so you don't need to add border styling to each individual row in the <td tag line.
Next, check that your <td tag lines don't have any border settings (unless you purposefully added them in), because they will cause things like unwanted font changes.
*I've noticed that for some reason, randomly and out of the nowhere, " style="width: ###; height=###;" " are getting added to my <table tag lines after the fact, which is really frustrating me. If anyone knows why, or how to stop it, please let me know.