Crimson-Med Crimson-Med - 7 months ago 18
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

https://jsfiddle.net/u39fqw38/

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

tr{
height:10;
padding:0;
margin:0;
}
td{
margin:0;
padding:0;
}

Answer

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.