So what I was looking for is a subtle radial gradient background effect which will move from left to right when the page is scrolled, like this site – https://hellonesh.io/ . So when I inspected the code of that site, I found the responsible HTML and CSS for that effect – HTML CSS jQuery/js But I&…
Tag: css
Pinning a Bootstrap Navbar to the Top of the Screen
How do you pin a Bootstrap navbar to the top of the screen? I’ve tried importing JS code but it doesn’t seem to work and the worst part is, it glitches trying to stick to the top when it is implemented, but when you scroll down, it is not actually a sticky navbar. Is there a practical way to fix
CSP issues with javascript and css – password visibility toggle
I am currently working on some frontend development on a server. However when I try to add inline css and javascript for my password visibility toggle I keep getting the same CSP errors in google chrome. Refused to execute inline script because it violates the following Content Security Policy directive: R…
JS, navigator.mediaDevices.getUserMedia() not working
I’m trying to get video from client’s Webcam. I wrote the code, and no errors occurred. However, when I try to get video, nothing shows up (in Google Chrome) or just a single frame of the video is displayed (in Mozilla Firefox). I have tested it out before and it worked completely fine, but now, I…
Why isn’t the width of an image changing after I use “width: 8%;” in CSS?
I’m new to react and I was trying to make a simple website with music notes (just some images) and wanted each note to change color when hovering over it. I know I can do this with :hover, but I wanted to try out useState for practice. I finally got the toggle feature (just the feature that made it chan…
Why using SVG in cell forces table to 100% width?
I’m building table that should display data in a reasonable way. And don’t take 100% width if it’s not needed. The problem is that in one column I use line chart, and when I build that chart with div it works well, but when I use SVG the table takes 100% (I prefer to use SVG as it more flexi…
ReactJS/CSS: How to set div height based on other element height?
I’m trying to set an fixed height to a div, to force the overflow scroll. The problem is, I’m doing this with JavaScript, inside a useEffect hook, but it’s not working well. Sometimes the height it’s set well, but at the most times is wrong. I created a function inside the component, t…
change opacity and animated that with react js
i started a simple project with react.in my project i have a paragraph and when mouse hover on paragraph (mouse enter event) a square appears under the paragraph and when hover out from paragraph(mouse leave event) that square disapear.but this occure so fast so i want changing this smoothly and i want use op…
react set style value to unset
A component has right and bottom css properties that are set using a classname. And I wanted to overide those values using the style prop. But so far I could set numerical values like 10px or 0px and others, but was unable to set it to unset. So what can I do to set them to `unset`? So far I
How to center a button in Javascript
I am trying to center a button in Javascript so that it is horizontally centered in the page. Right now, my button is in a in my html file, so I don’t know how I can use CSS to center it since it’s in Javascript. TLDR: In Javascript, if I hvae declared a button btn, what code should I write