Tag: css-selectors

56 votes
1 answers
1.5K views
How to use an XPath or CSS selector to look for a substring in Nightwatch testing

I'm having to do Nightwatch testing on the following element: <textarea id="xxxxxxxx-971-condition"

avatar
Georgie
0 1 0 9
asked 07 September, 2021
57 votes
2 answers
1.1K views
How to select an element&apos;s great-grandchild for CSS rules?

Given this HTML, how can I select rt-block to alter the CSS only when nested within rt-header as shown? <

avatar
Cortez
0 1 0 9
asked 07 September, 2021
50 votes
20 answers
1.1K views
CSS selector for first element with class

I have a bunch of elements with a class name red, but I can't seem to select the first element with the c

avatar
Janella
0 1 0 9
asked 07 September, 2021
50 votes
10 answers
2.2K views
Which characters are valid in CSS class names/selectors?

What characters/symbols are allowed within the CSS class selectors? I know that the following characters are i

avatar
Scot
0 1 0 9
asked 07 September, 2021
67 votes
23 answers
717 views
Is there a "previous sibling" selector?

The plus sign (+) is for selecting the next sibling. Is there an equivalent for the previous sibling?

avatar
Solomon
0 1 0 9
asked 07 September, 2021
64 votes
30 answers
2K views
Is there a CSS parent selector?

How do I select the <li> element that is a direct parent of the anchor element? As an example, my CSS w

avatar
Clarice
0 1 0 9
asked 07 September, 2021