lisovskiy329
lisovskiy329

Reputation: 1

How to remove margin from last child in this situation?

How can I remove for example margin from the last content__graph-item in this situatation?

<table>
 <tr>
  <td>
    <div class="content__graph-item"></div>
  </td>
   <td>
    <div class="content__graph-item"></div>
  </td>
 </tr>
</table>

Upvotes: 0

Views: 249

Answers (2)

Guruling Kumbhar
Guruling Kumbhar

Reputation: 1049

table tr > td:last-child .content__graph-item{
   margin:0px;
}

In this case, it is recommended to give a class name to the table.

Upvotes: 0

A Haworth
A Haworth

Reputation: 36512

It is the td that is the last child so try

td:last-child .content__graph-item

Upvotes: 1

Related Questions