Top "Css-selectors" questions

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

How to select the first, second, or third element with a given class name?

How can I select a certain element in a list of elements? I have the following: <div class="myclass"&…

css css-selectors pseudo-class
How to select first parent DIV using jQuery?

var classes = $(this).attr('class').split(' '); // this gets the current element classes var classes = $(this).parent().attr('class').…

javascript jquery css-selectors
What does the ">" (greater-than sign) CSS selector mean?

For example: div > p.some_class { /* Some declarations */ } What exactly does the > sign mean?

css css-selectors
Can CSS detect the number of children an element has?

I'm probably answering my own question, but I'm extremely curious. I know that CSS can select individual children of a …

css css-selectors
CSS selector - element with a given child

I'm looking to make a selector which will select all elements if they have a specific child element. For example, …

css css-selectors
Nesting CSS classes

Can I do something like the following? .class1{some stuff} .class2{class1;some more stuff}

css css-selectors
How can I select all children of an element except the last child?

How would I select all but the last child using CSS3 selectors? For example, to get only the last child …

css-selectors css
How to click a href link using Selenium

I have a html href link <a href="/docs/configuration">App Configuration</a> using Selenium I …

java selenium xpath css-selectors webdriverwait
CSS :selected pseudo class similar to :checked, but for <select> elements

Is there a way to style the currently selected <option> element in a <select> element? I …

html css css-selectors pseudo-class
Using the last-child selector

My goal is to apply the CSS on the last li, but it doesn't do that. How can I select …

css css-selectors