@law973
Posted
Looks pretty good!
To add horizontal lines to the nutrition table, I used this in my solution:
tr~tr {
border-top: 1px solid var(--stone-150);
}
The tilde symbol (~) means that the element on the right side will be styled if it is preceded by the element on the left side. In this case, table rows that have table rows before them will be styled, but table rows that don't have a table row above them won't be, which means that the line won't appear on the top of the table.
There's a handy list here that has information on this selector and others.
(Also good job on the custom unordered list bullets; I found those tricky as well.)
Marked as helpful
@SabineEmden
Posted
Thanks, @law973! That's the selector I've been looking for. I used the next-sibling combinator (+
) to add whitespace between the list items but forgot about the subsequent-sibling combinator (~
).
I also changed the color of the horizontal lines. I noticed I hadn't used stone-150
anywhere in my solution.