I am editing both the HTML and the CSS in order to fine tune the site. I need cell padding in one of my tables, however I cannot get it to work. I am aware HTML5 does not support such a thing, so I took to CSS.

I have been modifying .ms-rteTableOddCol-0 but to no avail.

Has anyone run into this problem, if so, how did you fix it?

Using SharePoint 2013.

  • HTML5 requires browsers to keep supporting the cellpadding attribute. (You would need CSS though to make padding different on different sides of cells.) – Jukka K. Korpela Dec 22 '13 at 20:53

If you are trying to change the cellpadding through CSS this is how you should do it

TABLE.css_class_here > TBODY > TR > TD { padding: 10px; } // Only for the 'parent' table.


TABLE.css_class_here TD { padding: 10px; } // If it's for ALL cells in the table, even child-tables.
| improve this answer | |

check this blog, to fix the padding issue: https://siderite.dev/blog/css-cellpadding-and-cellspacing.html good info here: http://blogs.msdn.com/b/anjali_chelawat/archive/2009/06/17/9765429.aspx

| improve this answer | |
  • Hi and welcome to SP.SE! Try to not only linkto different posts in your answer, but also include the important information in your post. That way your answer will still be helpful even if the links break :) – Robert Lindgren Dec 23 '13 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.