css::selectors

selectors usage examples

example of CSS code with one style piece per several selectors

Here we can see a piece of CSS code where we use class selectors - .selectors-table - as well as "nesting" slectors - all th elements inside element with class="selectrs-table". They are combined all together using comma so that the same styles can be applied to elements that satisfy at least one of the given selectors.

example of CSS code with attribute based selector for input

Here is a CSS selector that allows us to style all input elements with type="text" - which is an attribute of input HTML element - as well as elements with tags select, textarea.

All the above examples are created by Solomiia Leno

You can find even more usefull examples and explanation on the references page.

back