:first-child {
//styles here
}
:nth-child(1) { //the benefit of this is you can do it for 2nd, 3rd etc...
//styles here
}
/*CSS First - forth child*/
:first-child {}
:nth-child(2){}
:nth-child(3){}
:nth-child(4){}
:nth-child(1){
/* css code here */
}
p:first-child {
background-color: yellow;
}
selector:first-child{
//style
}
Code Example |
---|
Css :: css button click animation |
Css :: Sf pro font html |
Css :: btn glow on hover |
Css :: had to add a tint to a picture on css |
Css :: font family css |
Css :: clearfix |
Css :: webkit box shadow not working |
Css :: simple css reset |
Css :: remove link style |
Css :: npm registry package not found |
Css :: Modify your placeholder |
Css :: width 33 css |
Css :: css how to make text italic |
Css :: what css vmin |
Css :: change the weight of a bold font css |
Css :: css clip |
Css :: gradient btn |
Css :: hide navbar css |
Css :: style input field css |
Css :: .txt:hover { text-decoration: underline; } |
Css :: html checkbox change styling |
Css :: media queries import file |
Css :: css button generator |
Css :: dropdown size based on text |
Css :: css radial gradients |
Css :: text-overflow ellipsis hover tooltip css |
Css :: span size css |
Css :: padding left |
Css :: css selector last child |
Css :: make css variable negative |