0

I'm having an issue with CSS. It seems to only select items with the :last-child pseudo selector.

My markup:

<tr class="emtpy-row">
    <td></td>
    <td></td>
</tr>

My CSS:

.THIS .empty-row td,
.THIS .emtpy-row td:last-child {
    background-color: hotpink;
}

But, only the second td turns pink.

This is very strange to me. Anyone have an idea what's going on?

1
  • Could it be possible that an another style is applied with a higher priority rule? By precising :last-child, your rule is prioritized. Feb 23, 2017 at 16:09

1 Answer 1

2

Seems you have a typo. Your CSS says .THIS .empty-row td,, but the class is emtpy-row.

The :last-child pseudo-selector does not have the typo.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .