Top "Css-selectors" questions

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

How to select all children except first and last with CSS selectors

How would I select all the children in a table except for the first and last? I've tried this, but …

css css-selectors
CSS selector with period in ID

The HTML spec allows for periods (.) in an id: <img id="some.id" /> However, using a CSS ID …

html css css-selectors
What JQuery selector excludes items with a parent that matches a given selector?

I have var $set = $('.foo,.bar').filter( function() {return $(this).parents('.baz').length < 1;}); as a way to …

jquery jquery-selectors css-selectors
How to get the second match with QuerySelector?

The following statement gives me the first element with the class titanic element = document.querySelector('.titanic'); How would I …

javascript css-selectors selectors-api
Is there a CSS ":drop-hover" pseudo-class?

Saying I have an input type="file" field. One can drop a file on this input(like in Firefox) instead …

html css css-selectors pseudo-class
Styling <a> without href attribute

Is it possible to match all links without href specified via CSS? Example: <a>Invalid link</a&…

html css css-selectors
Can I combine :nth-child() or :nth-of-type() with an arbitrary selector?

Is there a way to select every nth child that matches (or does not match) an arbitrary selector? For example, …

css css-selectors
Can I make the CSS :after pseudo element append content outside the element?

I want to format a breadcrumb trail of links using an HTML &raquo; entity between adjacent links, so it …

html css css-selectors pseudo-element
Should I use CSS :disabled pseudo-class or [disabled] attribute selector or is it a matter of opinion?

I'm trying to style a disabled input. I can use: .myInput[disabled] { } or .myInput:disabled { } Is the attribute selector the …

css css-selectors pseudo-class disabled-input
Is there an addon which you can test css selectors in firefox?

I was wondering if there is such an addon in firefox where you can test out css paths to check …

css selenium firefox-addon css-selectors