Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [css-selectors]

Selectors are patterns that match against elements in a document tree. In a CSS rule, they are used to define styles for elements that match the pattern.

0 votes
1 answer
46 views

How to select a descendent of div.box-type-1, but only when div.box-type-1 is the closest ancestor with a .box-type-* class?

I’ve got containers with colored backgrounds that fall into one of three different categories, represented by the sass placeholders %dark-box, %light-box, and %gradient-box. I need to adjust the ...
jstoller's user avatar
0 votes
1 answer
12 views

Why pseudo-elements can't be used as an argument within :has() pseudo-class?

The CSS specs give following reason why pseudo-elements can't be used as an argument within :has() pseudo-class: Note: Pseudo-elements are generally excluded from :has() because many of them exist ...
Harsh Dadhaniya's user avatar
-2 votes
1 answer
49 views

Is this a Selenium oddity?

The following piece of code runs without error: from selenium import webdriver from selenium.webdriver import ChromeOptions from selenium.webdriver.support.ui import WebDriverWait from selenium....
SIGHUP's user avatar
  • 25k
0 votes
1 answer
18 views

iOS/OSx: CSS Nesting With Host Selector Not Working

CSS Nesting With :host Not Working On iOS/OSx While I already solved this issue for myself with a workaround, I bring this up for two reasons... I would like to know if this is actually a bug or not ...
Cody's user avatar
  • 9,916
0 votes
1 answer
21 views

Scss - How to add suffix and select as direct child element

Here is my code: .a { > .b { > .c { & > &__content { background: black; } } } } What I want: .a > .b > .c > .c__content { background: black;...
Jin's user avatar
  • 107
1 vote
2 answers
51 views

Trying to add a popup to a website page but the javascript isn't making the popup disappear on click

Edit: I adjusted the css and js as advised and was still having issues until I moved the script to the bottom of my html document right before my closing body tag. I guess it wasn't fully loading ...
DauphinDuEgg's user avatar
-1 votes
1 answer
23 views

Can someone explain to me how the first-child or nth-child works? [duplicate]

I want to style only the first div inside the experience-container, but it is styling all the divs inside the experience container. How can use :first-child or :nth-child to do this? This is my code: ...
Lucio Capezzuto's user avatar
0 votes
0 answers
18 views

Why do the :focus state properties override the :active ones in my CSS? [duplicate]

I get that the solution is to place the :focus selector and properties before the :active ones but I don't get why, especially considering that focus and active are different states, even if clicking ...
Oye Sobowale's user avatar
0 votes
0 answers
17 views

How to override prime-ng icon style in disabled state at icon input field

:host { ::ng-deep .p-inputtext { padding-top: 0.625rem; padding-bottom: 0.625rem; border: 0.063rem solid var(--neutral-medium-400); border-radius: $text-feild-...
Muhammad Essam's user avatar
0 votes
2 answers
33 views

Using nth-child for inconsistent formatting?

What is the most economical way to write this code? .colHeaders div:nth-child(2), .colHeaders div:nth-child(3), .colHeaders div:nth-child(4), .colHeaders div:nth-child(11), .colHeaders div:nth-child(...
Dr_Snooz's user avatar
0 votes
1 answer
39 views

Cannot select specific element from the html with `rvest`

I want to capture this download link (href attribute) in the line 406 from site: https://www.fda.gov/drugs/drug-approvals-and-databases/drugsfda-data-files, there should be an attribute 'data-entity-...
Yun's user avatar
  • 13
0 votes
2 answers
46 views

Selector for a button with no unique ID

I was writing test selectors for selenium in python for a website like Booking.com. For one example I had to automate selecting a button from a list of buttons. The format for the button is as under: &...
Dark Geek's user avatar
-1 votes
0 answers
60 views

CSS selector `:not(:has())` doesn't apply any styles

I have a small CSS/ SCSS problem I need to solve. I HTML structure to which I have to write some small SCSS to match a given style, an example is in the below snippet. The snippet I made should render ...
chraebsli's user avatar
  • 358
0 votes
0 answers
26 views

Search box input is not getting focused on shift tab

In dialog box, there is one input search box and one close button. On tab click both elements are focusable and readable by NVDA but shift+tab not allowing me to focus inside an search box but instead ...
prachi vandre's user avatar
0 votes
1 answer
39 views

Striping a dynamic table

I have a dynamic table that is pulling in rows based on ccss class. All of the rows are set to display:none until they are called in. I want to have alternate row colors for readability (white and ...
LG1023's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
1029