[ARCHIVE] Cell Padding in tables not working | Community
Skip to main content

[ARCHIVE] Cell Padding in tables not working

  • January 27, 2020
  • 9 replies
  • 0 views

Hi,

 

My table cells don't have enough padding. Please see attached picture to see how things look.

I already tried adding this code in: 

 

.article-body td, .article-body th {
padding: 20px;
}

 

But nothing seems to work. I even went into the css to set up each column to a specific width and nothing changed after publishing. 

 

Please assist!

9 replies

  • January 27, 2020

@Linda Laggos

You can add the padding directly in the HTML code like below:

<table cellpadding="10px">
<tbody>
<tr>
<td>Icon</td>
<td>IMAGE</td>
</tr>
<tr>
<td>What it does:</td>
<td>DESCRIPTION</td>
</tr>
</tbody>
</table>


  • Author
  • January 27, 2020

HI there,

 

Yes, I tried to do that as well. No change when viewing as an end user.


  • January 27, 2020

Thanks for confirming you tried that as well, Linda. It may be something that is overriding what is put in the code directly. Are you using any styles or classes in your table code? Could you provide the snippets of code you are using as well as the corresponding CSS for the items? 


  • January 28, 2020

Hey @Linda Laggos,

If you can provide a direct link to the placement of the table, we can also easily have a look.

As Jeremy also mentions it does sound like something else is overriding the CSS you're adding.

#helpsome regards,
Simon Blouner
Zendesk Consultant @ helphouse.io


Pulkit12
  • January 29, 2020

Hi Linda Laggos

Use the below code and it will provide the desired result

.article-body td {
     padding: 6px 12px;

}

Please let me know if it solves your issue 

Regards 

Pulkit


  • May 26, 2020

Please to share I have a similar problem and what I did is to update the css with !important so it can override any existing setup, especially if you are unsure where it comes from. E.g.

.article-body td {
     padding: 6px 12px !important;

}

Hope it helps.


Brett13
  • Community Manager
  • May 26, 2020

Thanks for taking the time to share this Gary!


  • Author
  • May 26, 2020

I've tried this solution and it does not work for me. I've provided snippets of code with no response from Support, unfortunately. Can Support reach out to me directly?


Brett13
  • Community Manager
  • May 27, 2020

Hey Linda,

Can you provide the exact code snippet you're using on your account? We're limited on what we can assist with from our end since custom code is outside or scope of support. Perhaps others can jump in and help with a little more information?

You may also want to get your developers involved to see if there's any custom code in your theme that could be preventing the above solution from working properly.