skip to Main Content

Html – Styling an element using nth-child

Please see the html below: <html> <head> <link rel="stylesheet" href="styles.css" /> </head> <body> <div class="container1"> <div class="box1">1a</div> <div class="box1">1b</div> <div class="box1">1c</div> </div> <div class="container2"> <div class="box2">2</div> <div class="box3">3</div> <div class="box4">4</div> </div> </body> </html> and the css below: .box1 { background-color:red;…

VIEW QUESTION
Back To Top
Search