second child css
.YourElementsClass:nth-child(2) {
/* your styles */
}
second child css
.YourElementsClass:nth-child(2) {
/* your styles */
}
nth child for class
<!DOCTYPE html>
<html>
<head>
<style>
/* Selects the second element of div siblings */
.out > :nth-child(1) .myclass {
background: red;
}
.out > :nth-child(2) .myclass {
background: green;
}
.out > :nth-child(3) .myclass {
background: yellow;
}
</style>
</head>
<body>
<div class="out">
<div>
<div>
<div class="myclass">
<p>This is some text.</p>
</div>
SOME
</div>
SOME 2
</div>
<div>
<div>
<div class="myclass">
<p>This is some text.</p>
</div>
SOME
</div>
SOME 2
</div>
<div>
<div>
<div class="myclass">
<p>This is some text.</p>
</div>
SOME
</div>
SOME 2
</div>
</div>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us