I am rendering list item by for loop. what i need is to give margin Top: 10 to every element except last element.
Given:
<ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>
In case you are using JSS, you can do:
'ul > li:not(:last-child)': { marginTop: 10; }
2.1m questions
2.1m answers
60 comments
57.0k users