Answers for "css first and last child"

CSS
31

css first child

:first-child {
	//styles here
}

:nth-child(1) { //the benefit of this is you can do it for 2nd, 3rd etc...
	//styles here 
}
Posted by: Guest on March-03-2020
0

not the first child and not the last child css

#navigation ul li:not(:first-child):not(:last-child) {
  ...
}
Posted by: Guest on June-15-2021

Browse Popular Code Answers by Language