Top "Css-selectors" questions

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

CSS3 selector :first-of-type with class name?

Is it possible to use the CSS3 selector :first-of-type to select the first element with a given class name? I …

css css-selectors
Need to find element in selenium by css

I want to find the element of this link "us states" in <h5>. I am trying this in …

selenium webdriver css-selectors selenium-webdriver
Changing CSS for last <li>

I am wondering if there is some way to change a CSS attribute for the last li in a list …

html css css-selectors html-lists
A CSS selector to get last visible div

A tricky CSS selector question, don't know if it's even possible. Lets say this is the HTML layout: <div&…

html css css-selectors
CSS Selector "(A or B) and C"?

This should be simple, but I'm having trouble finding the search terms for it. Let's say I have this: <…

html css css-selectors
How do I select an element that has a certain class?

My understanding is that using element.class should allow for a specific element assigned to a class to receive different "…

html css syntax css-selectors
:not(:empty) CSS selector is not working?

I'm having a heck of a time with this particular CSS selector which does not want to work when I …

html css css-selectors
Using CSS :before and :after pseudo-elements with inline CSS?

I'm making an HTML email signature with inline CSS (i.e. CSS in style attributes), and I am curious as …

html css css-selectors pseudo-element inline-styles
What CSS selector can be used to select the first div within another div

I have something like: <div id="content> <h1>Welcome to Motor City Deli!</h1> &…

css css-selectors
How to use querySelectorAll only for elements that have a specific attribute set?

I'm trying to use document.querySelectorAll for all checkboxes that have the value attribute set. There are other checkboxes on …

javascript css-selectors selectors-api