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?
LVL 2
GreatSolutionsC.I.OAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
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.
0
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!
0
NorieAnalyst Assistant Commented:
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;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GreatSolutionsC.I.OAuthor Commented:
Yes!
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>
0
NorieAnalyst Assistant Commented:
That should do it.:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.