Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
44 views

I have dashboard.scss which contains: @import '../../src/pages/DashboardPage/DashboardPage.module.scss', '../../src/ui-components/atoms/Button/Button.module.scss', '../../src/ui-components/...
SuperYegorius's user avatar
1 vote
1 answer
74 views

I've created a css only dropdown filter (that opens on click instead of hover). I used :focus-within to accomplish this. I tought this was a crossbrowser-safe property, because Can I Use states that ...
Marloes Groenewegen's user avatar
1 vote
2 answers
122 views

I have and SVg and adding tag inside svg and using nested css delcration syntax and wehn using & it gives error of some XMl error ; first see this html example <style type="text/css"> ...
xkeshav's user avatar
  • 54.2k
1 vote
1 answer
54 views

I have a table that is broken up into groups headed by specially formatted elements. The first row of each group requires some special formatting so it is appropriately spaced and delimited from the ...
Caroline Regalado's user avatar
-1 votes
4 answers
99 views

/* CSS */ em {font-style: italic; background yellow} ::autonomous-not-child-of-a-p-element-? :: em {font-style:normal; background gray} Given two situations both using <em> differently, in need ...
Sam's user avatar
  • 15.6k
-4 votes
2 answers
72 views

CSS: #container > a { color: yellow!important; } a:focus-visible { color: red!important; } HTML: <div id="container"> <a href="#">Anchor 1</a> ...
miqbal's user avatar
  • 2,237
1 vote
2 answers
206 views

I'm trying to work with CSS to alternate background color in my divs. I can do that, but which divs display changes. I'd like to be able to alternate only what's currently visible. Otherwise it's ...
Elaine's user avatar
  • 13
-1 votes
6 answers
916 views

I have a menu with submenu with a structure like this: <ul> <li> <a class="navigation-item">Menu Item 1</a> <a class="submenu-toggle"><a/&...
yangsunny's user avatar
  • 694
0 votes
2 answers
192 views

I have a button with a :active class instruction to scale down to produce a nice effect, it works fine on pc, but on my mobile device I found that the hover effect remained there after I pressed the ...
Ashmeet SIngh's user avatar
0 votes
1 answer
53 views

In my app, I have a component in which there are only two cards and I want to animate them when they are hovered and clicked. I noticed that when one of them is currently active (clicked) the other ...
Marya's user avatar
  • 198
0 votes
0 answers
20 views

I have this as required design: All 6 figures you see are buttons and they must have different title. The design however is almost identical except bg-color. So I created my styled-btn component: ...
Borislav Stefanov's user avatar
2 votes
0 answers
69 views

:root { font-family: Avenir, Helvetica, Arial, sans-serif; --form: 300px; --half: 150px; --size: 60px; --pad: 8px; --top: calc((var(--half) - var(--size)) / 2 - var(--pad)); --...
James Newton's user avatar
  • 7,162
0 votes
2 answers
55 views

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 ...
MicroMatrix's user avatar
0 votes
0 answers
19 views

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
1 vote
2 answers
285 views

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
0 votes
1 answer
45 views

Currently, I have a border surrounding the HTML of my website, so that it surrounds all content on every page. However, on my home page I have an image that slides in when the page loads and currently ...
kurosawaftw7's user avatar
0 votes
2 answers
55 views

I want to make targets of the :target pseudo-class visible. That is, if the target is a block element, e.g. <p>, that <p> should be outlined; and if the target is an inline element, e.g. &...
user avatar
2 votes
1 answer
72 views

h1 { color: red; } header h1 { color: revert; } <body> <header> <h1>Title</h1> </header> <h1>Level-1 heading</h1> <p>Body text.</p> ...
user avatar
1 vote
1 answer
30 views

I am trying to style lists in my website using pseudo elements to replace the default bullet point. However, the pseudo elements render on top of the dropdown menus in the navigation sidebar for some ...
Nick Heyart's user avatar
0 votes
0 answers
46 views

Question: Is there any way to programmatically activate pseudo-classes such as :hover, :active, :focus, etc., in JavaScript or React? If so, how can this be done without modifying the original ...
augusto amaral's user avatar
0 votes
1 answer
671 views

When I use :not(::placeholder-shown), :NOT seems to be not working in safari browsers. If you are not on safari: Below i added a way to use the safari browser with playwright so you can test it ...
Leon632's user avatar
  • 41
-1 votes
2 answers
91 views

Based on this answer, I managed to put an image as my icon appearing inside an INPUT control at its right edge. If I use a GIF that rotates, I'm all set. I only need to set the class on my control and ...
Konrad Viltersten's user avatar
0 votes
1 answer
49 views

I know I can change the cursor with one click with the following CSS code: #slide-arrow-prev:active { cursor: not-allowed; } Is there anyway to change a cursor after two clicks using only html ...
bkw's user avatar
  • 109
-2 votes
2 answers
65 views

I have an element inside a button that I wanted to animate when I hover it and also when I click on the parent element, the button. For that I used the :not and :active pseudo-classes to animate the ...
Willem JOURET's user avatar
0 votes
2 answers
37 views

I have created a 'block' for a webpage that for example is called 'test-div'. Test div also has an extra class added to it to change its background color ie. test-div test-div-bg-bright-gold test-div ...
Herro2689's user avatar
1 vote
2 answers
164 views

I want to make the first line of a paragraph bold only when the user hovers over the first line of the paragraph. I tried something like: p::first-line:hover { font-weight: bold; } Please note ...
Keshav Saraf's user avatar
0 votes
0 answers
30 views

I want to attach dynamically a pseudo-class :before to a label inside a component whose data come from a db. I know one cannot manipulate pseudo-class (easily/safely) with JS vanilla. So I think about ...
user avatar
4 votes
0 answers
377 views

I'm encountering an issue with the CSS pseudo-class :user-valid not behaving as expected for an input of type date. Similarly, :user-invalid doesn't seem to produce the desired results. However, :...
Vaka's user avatar
  • 51
0 votes
1 answer
38 views

I have seen code that applies to a simple input-label pair: HTML <input type="checkbox" id="toggle" class="checkbox" /> <label for="toggle" class=&...
Lawrence Love's user avatar
-1 votes
1 answer
489 views

For my buttons towards my code, it's not allowing the button to turn the cursor into a pointer when moving onto the button, and after a while my hover pseudo class selector is no longer working for ...
KeshonsWalksOfLife's user avatar
-1 votes
1 answer
70 views

I am looking at realizing a CSS Native multilevel menu for a sidebar without using Javascript (or the setState in my current React implementation). I have done almost everything, but I am getting ...
Ste's user avatar
  • 333
0 votes
1 answer
337 views

When I use the W3C CSS Validation Service on the following CSS code, I get a Parse Error ")". The error doesn't seem to be impacting the functionality. Any help is greatly appreciated. ...
kstoneman84's user avatar
0 votes
1 answer
35 views

I'm trying to change the border color from Mui TextFields,, with createThem from Mui v5, if the input is valid. The border gets set inside ::before and ::after pseudoclasses. I'm using variant="...
Jibrisu's user avatar
1 vote
1 answer
41 views

Let's say I have: <p>Paragraph.</p> <div class="note">Naked Note Div.</div> <div class="note"> <p>Paragraph in Note DIV.</p> <p>...
EntryLevel99's user avatar
0 votes
0 answers
2k views

I have a component with the following structure: <li key={index} className="custom--item group"> <p className="font-medium mb-2">Person No.{index + 1}</p> <...
MiRAY's user avatar
  • 195
0 votes
1 answer
30 views

I am trying to learn CSS fundamentals before diving into use of front end frameworks like Tailwind. I've made a small project for myself of making a webpage, and my first task is to make a sidebar ...
Joe Coon's user avatar
0 votes
0 answers
106 views

From mdn pseudo classes :scope The :scope CSS pseudo-class represents elements that are a reference point, or scope, for selectors to match against. To my understanding a "custom" pseudo ...
surfmuggle's user avatar
  • 6,046
0 votes
0 answers
70 views

I am using CSS Underline using pseudo styles to create underline for text. And facing an issue of underline thickness is changed on changing the position of the CSS property bottom on my website. ....
Tushar Jain's user avatar
0 votes
2 answers
171 views

writing text using ::after pseudo selector using content property and it's value comes from inline css variable. now on click of the text I am able to change the css variable value ( can be seen in ...
xkeshav's user avatar
  • 54.2k
1 vote
3 answers
326 views

Sometimes we may need to provide a path to a specific section on a web page using multiple different #-tail URLs, and for this task, as far as I know, we have to use multiple blank <a> elements. ...
yrslv2022's user avatar
-1 votes
3 answers
60 views

I'm trying to use CSS to make the text "Permits Required" and the ::before pseudo-class turn red - the ::before contains an icon. .knHeader__menu-list-item:hover::before { color: #...
rainybird's user avatar
1 vote
1 answer
180 views

I have CSS like this *:focus-visible { outline: 2px solid blue; /* This value is dynamically set based on configuration */ } I now have a button with class toggle that has .toggle { /* ... many ...
bigblind's user avatar
  • 12.9k
0 votes
2 answers
41 views

I recently discovered the :has() pseudo-class. When I tried to test it I didn't see any changes. I really don't know why. * { margin: 0; padding: 0; box-sizing: border-box; } body { ...
Michael's user avatar
  • 79
-1 votes
1 answer
191 views

I have this seudo-class selector in a script: querySelectorAll("header:has(+ div.content)"); When I display the page in Firefox, I get the following error: Uncaught DOMException: Document....
jjcb's user avatar
  • 27
1 vote
4 answers
119 views

I have some boxes that a lot of information inside them. I want the information less at first and if the user wants to read more information, they click the button "See More". Then if they ...
user avatar
0 votes
2 answers
96 views

When I hover over the <a>, it correctly changes color. But when I hover over the <p>, nothing happens. I do not understand why <p> does not change color when hovered. If I replace ...
BallpointBen's user avatar
  • 15.7k
1 vote
1 answer
309 views

In the :host-context() - MDN DOcs it is stated that: The :host-context() CSS pseudo-class function selects the shadow host of the shadow DOM containing the CSS it is used inside (so you can select a ...
J8ahmed's user avatar
  • 21
0 votes
0 answers
265 views

I have created a variable in Google Tag Manager where the variable type is DOM Element and the selection method is CSS Selector. I am trying to select a line of text from a page but getting a null ...
user22243295's user avatar
2 votes
0 answers
40 views

My input field has a label in the same position as the placeholder. When I click on the input field, the label moves up and appears at the top border of the input field, which looks really nice. ...
Imtiaz Ahmed's user avatar
0 votes
1 answer
73 views

Hello everyone I'm a beginner trying to get better at css. How can you target an element from another div in events like hover, checked, etc. see example of what I mean below: <div> <input ...
Abdul fatai Aliyu's user avatar

1
2 3 4 5
20