All Questions
25,066
questions
-2
votes
0
answers
14
views
I want to change the color of the body, but it takes up the entire screen [closed]
I'm creating a web page about a weather app, but I have a problem with the background-color of the body.
I gave the bodysuit the background color #191a38.
Inside the body I have a main with the ...
0
votes
0
answers
10
views
React App in Docker with Nginx Serving Without CSS
I am trying to deploy a React application using Docker and serve it with Nginx, mostly based on this. The app works perfectly when running locally using npm start, but when served through Docker and ...
-1
votes
0
answers
34
views
Is it possible to absolute position a conatiner to the left of a scrollable conatiner [closed]
My issue is that i have code something similar
<div className='flex flex-col'>
<div className='rounded-lg p-4'>
<div className='relative'>
<div className='absolute ...
0
votes
0
answers
10
views
How Do We Make Scoped Styling In Our Pages Folder a Higher Priority than Our Global Styling?
I'm working on a project that uses Gatsby 5.12.11 and I ran into an issue with styling components in the pages folder. I'm using a CSS framework I created called srcry css which has a couple classes ...
0
votes
0
answers
16
views
Disable browser/page navigation while horizontally scrolling iframes?
My site has a container of iframes placed side-by-side, which creates a horizontal scroll. When users use a two-finger gesture/trackpad scroll outside the iframe, it scrolls as expected. However, when ...
1
vote
2
answers
43
views
tailwindcss background not changing to correct color
There is a feature i implemented in the tiktaktoe wherein if a player wins the game, then the winning box gets green in color and if there is a draw , then all the box becomes red. The feature is ...
0
votes
1
answer
27
views
How to get and test an element style using RTL?
I have a sidebar menu component, which has a small tab to be pressed in order to show/hide the menu.
The tab, as the entire menu, can be rendered on the left or the right side of the screen based on '...
0
votes
1
answer
24
views
Remove Border Bottom From MUI Selected Tabs - React
I am trying to custom style MUI Tabs in order to get something like
I have create sample code Here is the codesandbox example in which border bottom will be 100% and for selected tab it should ...
2
votes
0
answers
34
views
Custom Caret Positioning in React Input Field Lags Behind Characters
Question:
I'm trying to create a custom blinking caret for an input field in a React application. I've hidden the default caret and positioned a custom caret based on the text width up to the caret ...
0
votes
0
answers
38
views
Passing In Tailwindcss Classes to Component Library Not Working
So, I am building a React component library (like the world needs another one) and an app on top of it. When I pass in Tailwind classes to the components from the app, the passed classes don't get ...
0
votes
3
answers
55
views
Multi-line Truncated Text with "..." in the end
I need help with Multi-line Truncated Text. I can't cut the final word with "..." in text block with randon string number
So this is my solution which cut the end of my block, but without &...
0
votes
1
answer
68
views
SVG Component Rendering Inconsistently Across Browsers
I'm working on an SVG gauge component that works perfectly in Chrome but has rendering issues in Safari and Firefox. The gauge displays progress using a gradient fill and a rotating pointer. In Chrome,...
0
votes
0
answers
30
views
CSS animations just stopped working on React
My css animations just stopped working and i have no idea why, this is a react project i'm working on to learn more about the framework, if someone knows why this happens it would help a lot, thanks.
...
0
votes
0
answers
15
views
Content Overlaps with Footer in Printed Document [closed]
When printing a document using the provided Page component, some content of the page get displayed under the footer in the printed output. This causes the content to overlap with the footer, making it ...
-2
votes
0
answers
21
views
How can I create a smooth transitioning dialog component in React? [closed]
I'm working on a React project where I need a dialog component that smoothly transitions between expanded and minimised states. The dialog must be fluid, hugging its content, so I can't use fixed ...
-2
votes
1
answer
50
views
How can I center the items in .jsx file? [duplicate]
I'm very at the beginning of web development. I'm currently learning Node.js and React with Vite. I couldn't center the header menu properly and things I found on internet didn't work. It is probably ...
0
votes
1
answer
30
views
TailwindCSS Breakpoints aren't applying [closed]
I have a NextJS 14 project that I am using Tailwind CSS with. I have the following:
<div className="text-amber-dim md:text-amber flex-1 h-screen flex items-center justify-center">
&...
0
votes
1
answer
54
views
Text fill effect but controlled by percentage
I'm attempting to create a text fill effect that will be controlled by a useState.
I have the following text:
According to a state I want it to be filled from left to right, although the last letter ...
0
votes
0
answers
23
views
Why Can't I change my border color in input field of material-ui?
I am trying to change the input border color to white even if its focused, hovered or just by default.
I have create a theme using makeStyles for the text and input fields but it does not seem to work....
0
votes
1
answer
37
views
Css files being applied to every component in my app [duplicate]
I have a React app in VS Code. I want to set a different background color for each component. However, even though each component only imports its respective CSS file, it still applies CSS from other ...
-1
votes
0
answers
29
views
Profile header not showing ( user not found ) error
so i have created a instagram clone in which i go to the profile section its saying user not found but in my code when i remove the "finally" block its showing only the skeleton but it ...
-2
votes
1
answer
18
views
Where to host video to preserve aspect ration/size (.mp4) [closed]
I have a React web application where I'm trying to display a .mp4 video. My current setup looks like this:
<div className="title-main-cont">
<div ...
0
votes
1
answer
55
views
How to show select option list on hover?
I want to show select option list on hover, but it's not working:
<div className="rating-option">
<select
id="rating"
className="rating"
...
-2
votes
0
answers
24
views
How to change the color of the svg icon using tailwindcss only while hovering through it? [duplicate]
I already read the questions about the SVG and this question my question is about how to do this with Tailwindcss only.
The project tools are React and Tailwindcss.
I want to change the color of the ...
0
votes
0
answers
35
views
unable to get consistent layout with tailwind for relative container
I am trying to build a form layout in a NextJS project with tailwind CSS.
here is the CodeSandbox Link for the issue.
After running the code in sandbox, please click the button the view the resulting ...
0
votes
0
answers
63
views
I get two different initial css values in two different major browsers
I was developing a React component that manages a state array. For each element in this array, I used the map method to generate a list of items, which were contained within a div that had the class ...
0
votes
0
answers
28
views
overflow is not working to hide translated element
I am trying to hide the translated element using overflow: hidden but it is not working.
The CSS overflow property hides content exceeding an element's boundaries. When elements are translated (e.g., ...
0
votes
1
answer
42
views
How can I use transition in CSS handling state with React?
const MyCart = () => {
const { cart, myCartVisible, setMyCartVisible, dispatch } = useCart();
const [ subtotal, setSubTotal ] = useState(0);
useEffect(()...
1
vote
0
answers
38
views
How to Reinitialize JavaScript Functionality for Dynamically Added Elements Without Duplicate Event Listeners?
I am developing a social media platform using Django for the backend and a purchased HTML template from ThemeForest for the frontend. The template was built using React and then exported to plain HTML,...
0
votes
0
answers
13
views
How to apply style to nested custom Mui-classes in a separate .module.scss file (using react.js)
What is currently possible:
Giving style to whole Mui component
<SimpleTreeView
sx={{
backgroundColor: '#000000'
}}
</SimpleTreeView>
Segregate styling to a separate class in .module....
0
votes
3
answers
51
views
Tailwind - React - Best way to structure HTML based on screen sizes
What would be the best way to handle an element which needs to stay in a specific place if the screen width is > X and stay in another place if screen width < X?
Example: https://jsfiddle.net/...
-3
votes
0
answers
42
views
How to make the parent element have the same width and height as the child svg element? [closed]
Hi so I am currently making a project with Vite.js with React + TSX, Tailwind and Daisy UI. I am currently trying to make a model button that overlaps a svg. The issue is that the button's width and ...
0
votes
0
answers
35
views
What causes the spaces between words to disappear only on certain view (e.g. mobile) in a React project? [closed]
I've been trying to debug this for a while, and can't find instances of anyone else having this issue.
I'm working with this Montserrat Google font in my React project. Here is my index.html file:
<...
-1
votes
0
answers
32
views
How to draw timeline like line for each item of the submenu for sidebar design [closed]
I have a little different design for a sidebar where, there is a timeline like line for each submenu in the list. Is there any implementation logic that can help, already any reference. Please have a ...
0
votes
1
answer
20
views
Keen-slider pushes layout
I'm building a layout in which I use react and the keen-slider library, when I put the keen slider in a div that is flex, the keen-slider pushes my layout. Below is my code. When I remove min-width ...
-1
votes
0
answers
30
views
How to customize animation of svg in react? [closed]
I am pretty curious how brilliant creates a page like this:
The animation of svg is compeletely interactive to the programming block in the toolbox.
I want to make a page similar to this in react. Is ...
0
votes
0
answers
23
views
Overlay and scale image to take up as much of the screen as possible with a smooth transition [closed]
I have a few columns of images of different heights and I'm trying to make it so that when you click on one of them, it transitions into taking the full height of the screen while keeping its aspect ...
0
votes
2
answers
43
views
Lost focus on one input effects all inputs
I have created an application form with a validation function that requires the user to input the correct information within the boxes before clicking away from that focused box or an error message ...
1
vote
1
answer
42
views
Image weird resizing behaviour when refreshing
When I refresh the page (below's a gif)
The Image is resized in a weird way.
<WifiWidgetContainer>
<Image
src={`/assets/[email protected]`}
...
0
votes
1
answer
38
views
Why do children of tailwind grid divs inherit their siblings' classes, such as padding and margin?
<div class="grid grid-cols-3 gap-2">
<div class="children-1 col-span-1 p-4 border rounded-md flex justify-center items-center bg-red-600 text-white">Hello</div>
...
-1
votes
1
answer
36
views
Can't change Z index with Mantine Pop over component styles
Summary
I'm trying to update the popover component styles in my Mantine project so that the z-index is 1 instead of 300, but I can't seem to make it work. The backgroundColor style works correctly, so ...
0
votes
0
answers
21
views
How do I stop react-slick slider image from indefinitely expanding and fit the container?
I am trying to create an image slider / carousel inside of a box. I have got the carousel working, but the image is too small. Whenever the width is adjusted (or infinite is true) the image just ...
0
votes
0
answers
35
views
Why does the prerender sometimes not load the page?
I ran into the problem that the prerender does not always work. There is one page where the prerender does not always work; sometimes it just returns a piece of broken code, not even reaching the body....
-1
votes
2
answers
31
views
Icons in React not centered vertically
I have this simple template:
<div className="wrapper">
<div className="block one">
<GoSearch />
15
</div>
<div ...
0
votes
0
answers
44
views
Pseudo-Elements not working properly on Mui table head and Mui table row but working fine in windows browsers
i am giving background color and border color with border radius to mui table head and mui table row.
it looks fine in windows and android all browsers but seems like position not working in mac and ...
0
votes
0
answers
23
views
Copying an HTML styled react-bootstrap element to clipboard with styles intact
Given a simple functional React component with a react-bootstrap Table using the striped property, what options are available to copy the table and all of it's contents, styles intact, to the system ...
0
votes
0
answers
18
views
React d3 tree display div on hover
I am rendering custom nodes in react-d3-tree. I want to display a div on hover only next to the hovered node. How can I proceed with this?
Each time I hover over a node, all the divs display, not only ...
0
votes
0
answers
48
views
how can I make element color transition smoothly with Tailwind CSS in react?
I have a React component where elements change color every 5 seconds based on a countdown timer. I want the color changes to happen smoothly, but my current approach doesn't work.
Here's the code for ...
0
votes
1
answer
32
views
How can I manage 3 element mode by on click function in next js
I am creating an accordion menu in nextjs , I want 3 mode of an element :
the first mode is default, when no click event happened : .mainLi_default
when the first click event happening and menu will ...
-1
votes
0
answers
30
views
Display flex is not taking affect in my website - I am making a food delivery application in react [closed]
enter image description here
This is the code for the navbar's right side menu items. And down below is the output in the browser:
enter image description here
I have inspected and checked the console ...