Recent searches


No recent searches

Adding and formatting tables in help center articles



image avatar

Aimee Spanier

Zendesk Documentation Team

Edited Jun 21, 2024


1

44

44 comments

image avatar

Trapta Singh

Zendesk LuminaryCommunity Moderator

Glad to hear that. Happy Zendesking :)

0


I've come across a weird phenomenon that I can't quite explain related to table formatting. I often use tables with white or coloured borders to give the appearance of displaying information in blocks or tiles. I recently noticed that when I view my help center articles on my MacBook Pro screen, I can still see the lines of the formatted table. However, when I drag that same browser tab to my external monitor, the lines disappear (see screenshots for comparison). Is it possible that the higher screen resolution on my MacBook (2560x1600) is the reason that I see the lines and not on my external monitor (2560x1440)? Or could there be another reason that these lines are appearing?

0


image avatar

Dane

Zendesk Engineering

@Zack,
 
Have you already tried to isolate if it's happening on all external monitors? That is definitely one weird behavior. 

0


Dane I haven't checked with another external monitor myself, but I asked a colleague to test it out and they experienced the same thing that I did. They have the same MacBook Pro that I do, not sure of the resolution on their external monitor.

0


image avatar

Dane

Zendesk Engineering

@Zach,
 
I have also tested it on my MBP. However, I was not able to replicate the issue that you are currently experiencing. If you choose to have this investigated, please contact us through Messaging and we'll look into it further.

0


Thanks for looking into it Dane. I'll contact through Messaging.

0


Hello, the advanced option for cell properties is missing, any idea how to have it back? 

0


image avatar

Neil

Zendesk Customer Care

Hi,
 
As mentioned in the article above.
 

If you need greater control over your table appearance, you need to change your help center security permissions to allow unsafe HTML. See Allowing unsafe HTML in help center articles for more information. If you decide to make this security change, the table properties window displays the following options:

The Advanced tab allows you to update the style, border color, and background color.

0


Hello, I have a question regarding formatting tables. Every time I create a table (new table or copy and paste from another doc) the format change completely when I publish the article. I understand that is normal for the way the editor has been conceived and I understand there is a way to add a defining code on the css theme (not supported by Zendesk). But my question is: how can I avoid this? I have recently created a table on a doc and it's impossible to keep the same format between cells even I used the same parameters. How can I create a table that is "stable"? Thanks

0


image avatar

Zsa Trias

Zendesk Customer Care

Hello Freyja,

I have found this article that can help: Why don’t table settings in the editor match the published article?

As mentioned there, by default, the Guide theme CSS overrides the cell padding you have set up through the table properties editor. The article also provides a code snippet that you can insert into your theme to have your cell padding reflected appropriately.

0


Trapta Singh is there specific coding we need to use to have cell borders on all 4 sides? I added both a table border colour and cell border colour and while I can see it in edit mode, when I preview/publish the border is only on the top and bottom of the cells.

0


image avatar

Trapta Singh

Zendesk LuminaryCommunity Moderator

Colleen Huck try adding below code at the bottom of style.css file.

 

.article-body table, .article-body td, .article-body th {
 border: solid 1px #000;
}

 

Let me know how it goes for you.

 

Thanks

Trapta

1


Trapta Singh  thanks that worked! 

 

Is there a way to apply it to individual guides versus the template as a whole? We don't always need the full borders. 

 

Further is it there any way to choose where you apply borders? (like in Excel or Word how you can have them on only the right or top of a specific cell)

 

Thanks!

0


image avatar

Trapta Singh

Zendesk LuminaryCommunity Moderator

Hi Colleen,


Yes you can. But for that you need to change the code a bit and where ever you want to add the border you need to add the class in the article source code.


You can use below snippet for the same:


.article-body .add-border table, .article-body td, .article-body th {
 border: solid 1px #000;
}

Now, for the articles where you want to add the border, you need to add an add-border class at the top of the source code.


Let me know if this works for you.


Thanks

Trapta

0


Please sign in to leave a comment.