p:nth-child(2)
{
background: red;
}
/*
Descendant selectors are used to match to any nested element.
Child combinators, on the other hand, only match to the direct
child element and are defined by the greater than symbol.
The selector on the right must be the direct child of the element
on the left.
*/
/* child combinator */
parent > child {...}
/* descendant selector */
parent child {...}
ancestor descendant {...}
Code Example |
---|
Css :: css dropdown menu with scrollbar |
Css :: select even child css |
Css :: cool hover effects css |
Css :: css border only top and bottom |
Css :: glassmorphism background in css |
Css :: decrease div size |
Css :: background image with color overlay gradient css |
Css :: css hide scrollbar |
Css :: jquery hide scrollbar but allow scrolling |
Css :: css how to change font colr |
Css :: css prevent new line div |
Css :: css center table on page |
Css :: template html css bootstrap cdn |
Css :: text-align property in css |
Css :: bootstrap 4 input error |
Css :: uninstall tinyproxy ubuntu |
Css :: table properties css |
Css :: beautiful navigation bar css |
Css :: css text align center |
Css :: html css background linear-gradient |
Css :: css columns |
Css :: media-queries |
Css :: glass css |
Css :: css overflow-y |
Css :: css mutline comment |
Css :: pagination in css |
Css :: css div take remaining screen height |
Css :: blue gradient background |
Css :: how to put an element in front |
Css :: css fade change coloir |