Reducing line spacing in table


#1

using div instead of p solved


#2

The Original Post read
How can i reduce spacing between two p-tags in <td> of a <tr>
https://jsfiddle.net/xny53qfd/
i tried
p {
line-height:10%;
}

You might try

<html>
  <head>
    <style>
      tr { 
          line-height: 40px;
          border:1px solid blue;
          }
      td { 
          line-height: 20px;
          border:1px solid red;
          }
     td p {
           margin:0;
           border: 1px solid black;
           background-color: yellow;
           }
    </style>
  </head>
  <body>
    <table>
      <tr>
          <td>
               something
          </td>
          <td>
              <p>line 1</p>
              <p>line 2</p>
          </td>
      </tr>
    </table>
   </body>
</html>

#3

Hi, i’m a New user. What do i do to have the badges?


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.