I currently have a parent element ‘[data-testid=”wallet”]’ with a child <div class=”css-3ro84u”>0 kr</div> I want to extract the balance at the beginning of the test, and then compare that value to the end of the test when the user has spent their balance to pur…
Tag: css
How to make navbar change color on scroll?
I have a transparent nav bar which on scroll is transparent. This means that if i were to scoll to a place that did not have a solid background color it would clash with other elements such as text. I would like to transtition into a different color to make it stand out more (including making the logo and a
How to make this drop down menus appear on click rather than on hover?
I was following a tutorial on how to create this nice looking sidebar that expands when hovering and fade in elements but it has a dropdown menu that expands when hovering as well (the desktop version) and I need it to expand only when clicking it. If you hover over Profile and Notifications menu items they t…
SASS Applies style to the whole website despite only imported into a single page
I’m trying to apply a SASS file on one single js page, but the import goes on the whole website. Here is my partner.sass file : and here is my partner.js file : Whenever I refresh or try to switch to another page, everything (which I believe is due to html and body tags from my sass file) is fading
how to ovelap a image on other image by styling scss in reactjs?
I have a design. In this design, one is overlapping on another image. I have created some code to try as given in the design. but it’s not working for me. Click here to find the design Below is some line of code of components. that is tried by me below is a style in scss Click Here to check
css replace word in centered sentence and have the width smoothly readjust
I’m looking for an effect like the primary one on this page https://sendgrid.com/ The page shows a centered sentence, a word is replaced, the sentence parts left and right to the word, smoothly readjust position according to the new word width. This code makes the parts snap into place after a word is r…
Why does displaying text inside the document via transform: translateY(-100%) create extra white-space at bottom of page?
Put very briefly I wrote a vuejs component that includes a small icon that displays some text when being hovered over. I created a minimal example here: https://codesandbox.io/s/sweet-jackson-v0kgc?file=/src/components/ShowBox.vue:115-136 The special thing is: when the icon is at the very bottom of the page t…
Display a Swiper slider when clicking a thumbnail in a gallery
I’m building a thumbnail gallery with a slider feature using Swiper. By default, the slider is hidden, and when the user clicks one of the images, the slider must be displayed showing the clicked image. Once the slider is open, the user can click a Close button to hide it and return to the thumbnail gal…
Undefined Range Value
For context, I’m just learning JS. On my web-page, I want to have the option to create new range-inputs that are interactive. I also want to use the values of the ranges for an equation. Right now, I can add the ranges themselves fine, and they work, but the values of each range returns as undefined. I …
unable to add a border to popup modal
I am using a Popup modal component from the reactjs-popup library. This is how it looks like: I want to add a thick black border to the popup component. How can I do so? My current css doesnt seem to work. Answer You need to set border-style: solid; the default is none. (maybe border-width too)