Crimson-Med Crimson-Med - 1 year ago 114
HTML Question

Table row padding not disappearing

I am having a little problem with my padding in a table. I created a table and I noticed that my rows have a lot of empty text.

Thus I tried to put the padding and margin to zero but this hasn't helped to reduce the big white gap at all.

I have joined a picture of what I would like to be taken off.

If anyone has any suggestions that could help get rid of this problem and thus make the table more compact.

enter image description here

Unfortunately I can't post the html here as it has to many Chinese characters and this is blocked by the SO filters.


Answer Source

First of all, height:10; is invalid as it does not contain units.

To fix your problem, you can add:

table {
  border-collapse: collapse;
td p {
  margin: 0;
  padding: 0;

Fixed JSFiddle.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download