-2

Whenever using unordered lists, it seems to start the list off "lower" than the current position:

For example:

<html>
<head>
<style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
</style>
</head>
<body>

<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
  <tr>
    <td>
    <ul>
      <li>Coffee</li>
      <li>Tea</li>
      <li>Milk</li>
    </ul>
    </td>
    <td>$80</td>
  </tr>
</table>

</body>
</html>

enter image description here

How do I stop the unordered list from pushing the content down? This messes up the formatting for one of my HTML reports that have sections based on table rows.

Dulani Maheshi
  • 1,070
  • 1
  • 10
  • 30
LewlSauce
  • 5,326
  • 8
  • 44
  • 91

1 Answers1

2

Put a margin: 0 on the ul like so:

ul{
   margin: 0;
}