You could also use a :before on the ul as a whole, and then you could use margins if you want. The tricky part would be stopping the line at the right place. One way to handle that would be a before: on the final li with a background color that covers it up.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.