Top "Css-selectors" questions

Selectors are patterns that match against elements in a document tree.

jQuery: select an element's class and id at the same time?

I've got some links that I want to select class and id at the same time. This is because I've …

jquery dom jquery-selectors css-selectors
How can I get a specific number child using CSS?

I have a table whose tds are created dynamically. I know how to get the first and last child but …

html css css-selectors
How to select first and last TD in a row?

How can you select the first and the last TD in a row? tr > td[0], tr > td[-1] { /* …

css css-selectors
How can I apply styles to multiple classes at once?

I want two classes with different names to have the same property in CSS. I don't want to repeat the …

css css-selectors
What does the "~" (tilde/squiggle/twiddle) CSS selector mean?

Searching for the ~ character isn't easy. I was looking over some CSS and found this .check:checked ~ .content { } What does …

css css-selectors
:after and :before pseudo-element selectors in Sass

How can I use the :before and :after pseudo-element selectors following the syntax of Sass or, alternatively, SCSS? Like this: …

css css-selectors sass pseudo-element
Combine :after with :hover

I want to combine :after with :hover in CSS (or any other pseudo selector). I basically have a list and …

css css-selectors pseudo-element
CSS last-child selector: select last-element of specific class, not last child inside of parent?

<div class="commentList"> <article class="comment " id="com21"></article> <article class="comment " id="…

html css css-selectors
In CSS what is the difference between "." and "#" when declaring a set of styles?

What is the difference between # and . when declaring a set of styles for an element and what are the semantics …

css css-selectors
What is syntax for selector in CSS for next element?

If I have a header tag <h1 class="hc-reform">title</h1> h1.hc-reform{ float:left; font-size:30…

html css css-selectors siblings