Question: I have set up a rule for the last LI tag of my UL:

```
.className li:last-child {
  stuff: here;
}

```

Am I able to set a rule in the CSS that says "apply this style to the last LI tag EXCEPT if the `last-child` is also the `first-child`", i.e. there is only one LI tag in the OL.

Answer: 
You can use it together with `:not()` selector.

> 
> CSS pseudo-class [`:not(X)`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not) is a functional notation taking a simple selector *X* as an argument. It matches an element that is not represented by the argument.
> 
> 
> 

```css
li:last-child:not(:first-child) {
  color: red;
}
```

```html
<ul>
  <li>item a</li>
  <li>item b</li>
  <li>item c</li>
</ul>

<ul>
  <li>only item</li>
</ul>
```
You can leave your CSS as it is and add a rule that overwrites it if it is the first child:

```
/* What should happen in the last child */
.className li:last-child {
    stuff: here;
}

/* If there is only one child the previous one will be overwritten by this one */
.className li:first-child {
    /* default values */
}

```

Alternatively, you can use something more advanced:

```
/* Select the last child if it is not the first child */
li:last-child:not(:first-child) {
    stuff: here;
}

```

I would use the second, but that depends upon your familiarity with CSS.

**More analytically**:

* `:last-child` - Select the last child
* `:not()` - If it's not
* `:first-child` - The first child