How to remove spacing inside cells of a table?

I am creating an HTML signature, that consists on a table with 4 cells from left to right.
Currently the Table width is set to 50% , and my 4 cells have, from left to right, widths of 30%,25%,25% and 20%. It looks not bad, but on a big screen, there is a huge spacing inside the cells.
How can i define the widths so it adapts to whatever max. width i have inside (up to a maximum) so all the cells are together correctly with single spacing from left to right?
If not doable with a table, how can i do this with divs?
Who is Participating?
NorieVBA ExpertCommented:
As far as I know HTML5 doesn't support the cellpadding attribute for tables and you need to use padding in CSS.

td {
    padding: 1px;
NorieVBA ExpertCommented:
Try setting the cellpadding attribute of the table, that's what controls the distance i.e. space between the cell 'walls' and the cell content.
GreatSolutionsC.I.OAuthor Commented:
I saw that, i forgot to mention in my question i would like it to be html5 compatible :-)
Thank you for jumping in!
GreatSolutionsC.I.OAuthor Commented:
Since i need it for a signature, it has to be inline, so something like that will do?
<td style="padding: 1px; width: 30%;" rowspan="2">test</td>
NorieVBA ExpertCommented:
That should do it.:)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.