Check out example codes for "child css". It will help you in understanding the concepts better.

Code Example 1

p:nth-child(2)
 	{     
 		background: red;
 	}

Code Example 2

/*Specify a background color for every <p> element that is the 
second child of its parent:*/
  
 p:nth-child(2)
 	{     
 		background: red;
 	}

Code Example 3

:nth-child(3) { //the number is the child number you are targeting
	//styles here 
}

Code Example 4

/* Selects the second <li> element in a list */
li:nth-child(2) { 
  color: lime;
}

/* Selects every fourth element
   among any group of siblings */
:nth-child(4n) {
  color: lime;
}

Code Example 5

/* Answer to: "css child selector" */

/*
  Child Selector is used to match all the elements which are child
  of a specified element. It gives the relation between two
  elements. The element > element selector selects those elements
  which are the children of specific parent.

  The operand on the left side of > is the parent and the operand on
  the right is the children element.
*/

#idOfParentElement > .classOfChildElement {
  /* Your CSS Properties for the child element */
}

/* If you want to get all child elements of the parent, use "*" */

.classOfParentElement > * {
  /* Your CSS Properties for the child elements */
}

/* If you want to get all <span> elements of the parent, use "span" */

body > span {
  /* Your CSS Properties for the child elements */
}

Code Example 6

li:nth-child(even) { /* Selects only even elements */
    color: green;   
}

Learn ReactJs, React Native from akashmittal.com