Fir example I have a To-Do list ul > li
for short.
Between each li
I have a margin-bottom
.
.todo-item {
margin-bottom: 1rem;
}
.todo-item:last-child {
margin-bottom: 0;
}
But you can use this for it:
.todo-item:not(:last-child) {
margin-bottom: 1rem;
}
:not
has great Browsers support
Use and happy!
Top comments (0)