Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css last child

li:last-child {
    background-color: lime;
}
Comment

How do you get a 2nd last child in CSS?

p:nth-last-child(2) {
  text-align: center;
}

// selector for second to the last child
// this will select second p element of parent, counting from the last child.
// parameter passed will determine number of element from the last element.
// in this case 2 which is the second to the last child.
Comment

PREVIOUS NEXT
Code Example
Css :: button type submit css selector 
Css :: css highlight element 
Css :: image responsive css 
Css :: media screen smartphone 
Css :: difference between private key and private key ssh 
Css :: how to install tailwind css in html 
Css :: rotate keyfreame animation 
Css :: how to put mulitple conditions in media query 
Css :: change png color css 
Css :: scrollbar css 
Css :: css transition ease 
Css :: drawing a circle with css 
Css :: tailwindcss table 
Css :: css media queries mobile first 
Css :: css columns 
Css :: add arrow in select css 
Css :: css background overlay 
Css :: box style 
Css :: setting multiple css using dom 
Css :: css hide element 
Css :: overflow property 
Css :: how to make a game engine 
Css :: bootstrap 4 scss angular 8 
Css :: flex grow 
Css :: changer angle div 
Css :: how to add default font css 
Css :: how to create wave like border 
Css :: css select text inside div 
Css :: difference between pseudo elements and pseudo classes 
Css :: padding top bottom 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =