first-child
:first-child {
//styles here
}
:nth-child(1) { //the benefit of this is you can do it for 2nd, 3rd etc...
//styles here
}p:first-child {
background-color: yellow;
}
Also in CSS:
- border-box css
- css to hide scrollbar
- select box arrow hide css in ie
- css change multiple classes
- how to select classes that start with a certian name
- typescript not supporting scss
- animate font weight css
- :root css
- tradutt
- make the first item at the very top of the screen
- css padding
- css flex vertical align
- affect top div opacity without affecting childrne
- detect if an element has a class jQurey
- equivalent zoom css
- vertcial text css
- comment out css
- how to play css animation with javascript
- css click event jquery
- text shadow effect
- css transform transition
- css hide element
- css limit text length
- min and max width media query