What is the use of nth-child() selector in CSS?

Back to Questions
A)

It is used to inherit the properties of the parent element.

B)

If nth-child() is given for an element, it will automatically take some pre-defined styles.

C)

It is used for zebra-striped tables.

D)

It is used to give proper spacing between the parent element and child element.

E)

It is generally used to display different background-colors for even and odd rows in tables.

 

Author Explanation :

For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows.


© Copyright 1997 - 2019 | www.bestdotnettraining.com | www.deccansoft.com | All Rights Reserved.
 
Bestdotnet google plus
Enquiry Now



Input symbols