15,495 questions
1
vote
2
answers
58
views
How do I code a CSS Selector to find a specific button, click on it, and wait until the webpage has completed the clicked task?
I have a working web scraper written in Python, Selenium and Chromedriver (all up-to-date version wise) and various other software packages. The target webpage has a field for the phone number, but ...
2
votes
1
answer
72
views
CSS Universal Selector Combinator omits style on table tag (1st descendant) in a div
I have a table (in a div with an id) and I want to apply styling on it (to collapse its borders) using CSS's universal selector combinator (*) and all of the div's descendants (in order to isolate the ...
3
votes
2
answers
127
views
Is there a way to target a pseudo-element in CSS by its class?
I am looking to construct CSS to target this element...
<input type="button"
pseudo="-webkit-media-controls-play-button"
aria-label="play"
...
1
vote
3
answers
89
views
Targeting element which is has not a parent with :not(custom-component)
I am trying to target a paragraph only if it is not inside the custom component my-component. like this:
// Style all elements that are NOT inside my-component
:not(my-component) *{
color: red;
}
...
3
votes
1
answer
108
views
clicking a button with JavaScript using a class and anchor text, rather than ID
I am trying - and failing - to write JavaScript to click this button:
The HTML for the button varies depending on the page
Example 1
from this page:
<span class="a-button-text" aria-...
0
votes
0
answers
29
views
How to select the nth child element that contains a specific attribute in CSS [duplicate]
Below is my HTML code that showcase the problem. Without modifying the HTML structure or adding a class is it possible to select the 3rd span.chatbot-bot-response-inner that contains for example img[...
-1
votes
1
answer
54
views
Why does my image overflow with a defined max-width but works fine with a defined width? [closed]
When I have the width style of an image defined to be 100% of the parent then the image does not overflow. But, when I define the max-width to be 100% of the parent then it overflows. Here is my ...
0
votes
0
answers
65
views
PostCSS parent Selector is adding :is() pseudo after compilation and not producing compatible css
I have just migrated from SCSS to PostCSS and encountered only one issue I cannot resolve.
The issue concerns how to alter a the styles of a nested element when its parent has a specific class.
The ...
6
votes
1
answer
150
views
CSS nth-of-type; but how to only effect types directly in series
Let's say we have a list of items, with splitter elements (<h3>), for example dates :
<h2>Big Header</h2>
<div id='container'>
<h3>Week Title A</h3>
<...
1
vote
1
answer
73
views
Unexpected variable resolution order in CSS with var/property nesting [duplicate]
My goal is to have an architecture where the shadow is defined once, but the color changes depending on HTML attribute data-color-mode.
Note: code provided is just for the isolated problem ...
0
votes
1
answer
65
views
Hide a ::before overlay when a parent's attribute changes, after solving a duplicate pseudo-element issue
I'm developing a custom user stylesheet for YouTube to add a "WATCHED" overlay to video thumbnails.
My main objective is: The overlay should be visible on any video that has been watched, ...
3
votes
3
answers
135
views
Is it possible to select the first row in a table with CSS?
Given:
<table>
<caption>Table Title</caption>
<thead>
<tr>...</tr>
</thead>
<tbody>
<tr>...</tr>
</tbody>
</table&...
3
votes
1
answer
111
views
CSS selector computed aria name
Is it possible to select via a CSS selector (or xpath) an element based on its computed aria name (=accessible name)? For instance for buttons it is computed like
The button has an accessible label. ...
1
vote
1
answer
83
views
How to select all but the last-child, unless the last is also the first
Not that two lines versus one is an issue; but I'd like to learn if there is a more concise way of selecting all but the last-child unless the last-child is also the first-child or only-child, in ...
1
vote
1
answer
102
views
I can't select the css element to data scrape in R. How do I format it to select the information?
I am learning to scrape data and using the website https://quotes.toscrape.com/ as a training dataset. When I try to collect the about section links, I get this error: Error in html_attr(html_elements(...