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.
css-selectors
15,432
questions
-2
votes
1
answer
48
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....
0
votes
1
answer
14
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
...
0
votes
1
answer
16
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;...
1
vote
2
answers
44
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 ...
-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:
...
-2
votes
0
answers
39
views
Hide option box not required [closed]
First time poster here. Does anyone know how to hide this superfluous option box?
My software provider recently issued a new version of a bookings widget, however, there is a redundant options box ...
0
votes
0
answers
17
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 ...
0
votes
0
answers
12
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-...
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(...
0
votes
1
answer
37
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-...
0
votes
2
answers
42
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:
&...
-1
votes
0
answers
52
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 ...
0
votes
0
answers
25
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 ...
0
votes
1
answer
38
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 ...
0
votes
2
answers
74
views
CSS Selector if parent has class
Now that there is CSS Nesting, if I'm using a body-level class for "dark" or "light" mode, I would love to set attributes to a selector that's deep in the nest by referencing the ...