Check out example codes for "css select all elements except last css". It will help you in understanding the concepts better.

Code Example 1

To give a border to all 'div's except the last one:
div:not(:nth-last-of-type(1)) {
	border-bottom:2px solid #f1f1f1;
}

syntax: 
<html tag name>:not(:nth-last-of-type(n)) {-----}

Learn ReactJs, React Native from akashmittal.com