How-to articles, tricks, and solutions about PSEUDO-CLASS

How to Create a Glowing Border Around an Input Field

In this snippet, we’re going to demonstrate some examples of creating a glowing border around an input field. For that, you need to use some CSS properties.

How to Get a Specific Number of Child Elements With CSS

The :nth-child() pseudo-class selects only the elements that are nth child elements. Read and see examples of getting a specific number of child elements.

How to Select All Child Elements Except the Last One

Sometimes, you may need to select all the child elements except the last element. For that purpose, you can use the :not and :last-child pseudo- classes.

How to Select the Last Second Element with CSS

In this snippet, you’ll find out how to select the last second element with pure CSS. To achieve the goal, you need to use the CSS :nth-last-child() pseudo-class.

How to Style Even and Odd List Items

In this snippet, we’re going to demonstrate how to style the even, odd, or both the even and odd items of an unordered list. See examples with each of them.