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

All Questions

Tagged with
0 votes
1 answer
50 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
-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
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
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
-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
2 answers
77 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 ...
BobtheMagicMoose's user avatar
1 vote
1 answer
74 views

CSS Variables Not Respecting Selector Precedence? [duplicate]

I've got some code I'm writing for a website builder that's causing me issues. We're using CSS variables to define global styles, with both desktop and mobile layout options, e.g.: :root { --section-...
Steven Moseley's user avatar
2 votes
1 answer
48 views

Applying a class to parents of a specific class

I have a bunch of tables in an HTML document. Some of the cells have a certain class of span inside them (.signs); some of them don't. And I need to apply a border specifically to the ones containing ....
Draconis's user avatar
  • 3,391
0 votes
0 answers
11 views

Select a tags whose href attributes end with ".ca/" * [duplicate]

Trying to select attributes that have links ending with ".ca" ti highlight them on different color HTML goes <li><a href="http://www.google.ca/">Google</a></li&...
user22973069's user avatar
-1 votes
1 answer
37 views

Nesting inside :is and :where pseudo-class selectors [duplicate]

Consider the following HTML and CSS code: .main :is(section p) { background: darkcyan; } <section class="main"> <p>Hello</p> </section> I expect that the ...
Vitaly Kuznetsov's user avatar
1 vote
2 answers
90 views

CSS ":is()" pseudo-class with relative selectors

I want to style specific "sections that are directly inside the body" and "sections that are directly inside a div directly inside the body" with the ":is()" pseudo-class,...
NineChu's user avatar
  • 13
-4 votes
1 answer
52 views

CSS control buttons [closed]

I need to design 4 buttons like this. Consider the sides and buttons sides are solid. Give The 4 buttons pizza cutting shape as the buttons are the slice of pizza. (like the given image) The design is ...
Saikat Islam's user avatar

15 30 50 per page
1
2 3 4 5
646