The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] combine a list first-of with last-of with 2 different attributes
I am trying to make my code leaner so is there a way to combine a list li:first-of-type { margin-left: 0; } with a li:last-of-type { margin-right: 0; } or do I have to do it the standard way on 2 separate lines? Thanks in advance!
li:first-of-type { margin-left: 0; }
li:last-of-type { margin-right: 0; }
Ok I see…I wasn’t sure but I now have the answer! Thanks!