All Questions
226 questions
3
votes
1
answer
46
views
Want wrapped content to expand only downwards with CSS
I have a searchfield that autofills with different quippy lines that may or may not need to wrap to fit all the words. This is anchored to a centered parent that makes sure that the searchfield ...
0
votes
0
answers
39
views
Is there a way to use the main scrollbar for a popup?
Title: Use main scrollbar to control popup scroll, freeze body background scroll without popup scrollbar
Question:
I'm trying to implement a popup/modal on my website that only uses the main scrollbar ...
0
votes
2
answers
48
views
How to display long dropdowns in a `fixed` viewport?
I have a customized date picker (for the context its height is 1050px). I want to display it in a popup within dropdown content. This is my popup component.
<div
className={styles.popupWrapper}
&...
-1
votes
1
answer
62
views
Full Screen background image in React
I'm trying to create a website using typescript + React but I'm having some issues. I have embedded a video into my website that I want to be the background for the first section but no matter what I ...
1
vote
1
answer
61
views
How can I set the table tr in css module (nested css)
I am using css module like this ,
.catTable{
border:1px black solid;
}
in jsx
import styles from "../css/basic-styles.module.css";
return (
<table className={styles.catTable}>
...
3
votes
1
answer
104
views
Fixing Transparent Line Between Div with Clip-Path and Parent Div
A thin, transparent line appears between the triangular div and its parent div when zoomed. I believe this is likely caused by anti-aliasing in the browser. If there is a way to fix this, I would ...
0
votes
1
answer
36
views
Tailwind css - div not filling all the way to the top of given space when placed in a grid
I'm working on a personal website and am confused as to what is happening here.
I have a grid of 6 columns, in which 5 columns are taken up by a "GridItem", and have an additional leftover ...
0
votes
1
answer
46
views
My Radio Buttons Are Grouped on the Same Line (Left, Middle, Right). I Clicked The Label for the Second Radio Button and the First One is Selected
I have three radio buttons, all on the same name. When I clicked the first one, it selects the first on. When I click the second one (Need to click the bubble), it selects the second one. When I ...
0
votes
0
answers
24
views
React Conditional Rendering: div changes size when using empty div
I have a grid set up like this in a JSX element:
<div className={"board"}>
{board.tiles.map((tile, index) => (
<TileView
key={index}
value={...
0
votes
1
answer
48
views
Maintaining page centering with uneven divs on the sides
Here is what I want:
Here is what I'm getting:
DIV1 is centered in the center of the page
Here is my code using tailwind:
<div className="flex flex-col items-center justify-center mt-10&...
0
votes
0
answers
28
views
Image accordion in .jsx but the images are too far apart from eachother
I am currently having an issue with my image accordion. The accordion I implemented works fine, but at rest the images are really far away from each other, and I want to have them touching. I have an ...
0
votes
1
answer
48
views
Modify CSS for Android and iOS
I'm making a responsive landing page but I'm having trouble modifying the HTML elements for Android and iOS. For example:
I change the font-size of an h1 but it doesn't change on iOS but it does on ...
0
votes
1
answer
147
views
CSS: crolling left column with a sticky right column. Works but can't understand why
.sticky_show_container {
width: 100%;
display: flex;
justify-content: center;
height: 150vh;
}
.sticky_show_grid {
width: 90%;
display: grid;
grid-template-columns: 1fr ...
0
votes
1
answer
133
views
Form tag breaks document layout
Using React with Chakra UI. Found, that default <form> tag breaks layout. Adding and deleting <form> shows that only it affects layout. Components inside <form> appears like they are ...
1
vote
0
answers
97
views
How to conditionally modify react-orgchart's orgChart CSS classes?
I'm making an organization chart that has collapsible nodes functionalities. These are the CSS classes that control the lines in the chart connecting the nodes:
#orgChart .orgNodeChildGroup ....
1
vote
0
answers
32
views
Styles at media quary applies only partially
I am trying to make mobile navigation but my styles at medea applying only partially, to be precisely it applies background color but not flex styles.
JSX
import classes from "./Header.module....
0
votes
0
answers
242
views
How do you properly override the User Agent Stylesheet in a React Project?
From what I gather there is a precedence to inheriting CSS values, and elements inherit alot of their values from the User Agent Style Sheet in an attempt to set some standard. Im in chrome and the h5 ...
0
votes
1
answer
56
views
How do I fix the layering of my Navbar and Banner?
I'm using React & Tailwind, and I'm currently working on my Navbar and Banner.
As you can see from the photos below, although my page looks fine stylistically, I can't hover/click on my Events and ...
1
vote
1
answer
49
views
How can I reference logo.png files with names in my React application and display them dynamically for the tech stack of my projects section?
I'm working on a web development project where I have a list of projects, each with a title, description, and a technology stack. I want to display technology icons next to the names of the ...
0
votes
2
answers
208
views
Image not being masked by SVG [duplicate]
The SVG that is meant to mask the image lies under the image and isn’t masking it. Also, adding WebkitMask to the inline style makes the image disappear from live server page. I'm using CSS modules, ...
0
votes
1
answer
175
views
Header's Logo Image Not Appearing Properly
I am rendering HTML using JSX and creating a header which has logo to the left side...but it is coming out to be in the way that is shown in my uploaded photo. I have also uploaded the corresponding ...
0
votes
1
answer
37
views
Why elements on screen are not fullscreen?
I don't have my web-app on react full-screen, having so small amount of elements on the page.
Css:
html {
height: 100%; width: 100%;
}
* {
margin: 0; padding: 0; box-sizing: border-box;
}
body {
...
0
votes
1
answer
53
views
How do I include an HTML tag with its attributes as a string inside an element?
I want to include this html tag with those exact colors inside an element inside a JSX environment.
I tried doing it like this:
const htmlTag = '<ifx-icon icon="calendar-16"></ifx-...
1
vote
1
answer
43
views
Animation CSS showing in inspector, however animation is not firing
I have a CSS animation that I am wanting to kick off on page load, and I would like for the components to have different delays while sliding onto the screen.
I can see that the values I have added ...
1
vote
1
answer
72
views
How to style mapped objects in React.JS?
I'm new to React.JS.
I need to make an order form with two switch buttons and then style them. I can't style them.
I've been told to create the buttons this way
{props.options.map((option)=> (
&...
1
vote
1
answer
115
views
How do I fill the skewed div to fit the container? [duplicate]
I'm trying to make an image gallery where the images are slightly skewed, but the skewed div specifically div 1 and 5 are not entirely fit the container. How do I remove the colored background so that ...
0
votes
1
answer
39
views
CSS animation at the edges of my page making it change sizes
I'm pretty sure the answer is simple, but I've been going at it for a while. I'm working on the landing page for a website where there are images stuck to both edges of the page simulating swaying ...
0
votes
1
answer
35
views
Add non-editable elements before and after an input
First of all, the question is really similar to this one in particular but, as the user that asked the question said, it's not entirely answered, and i would know if it's posible or not to ...
0
votes
1
answer
146
views
React buttons only show up when using Inspecton page (Chrome and Edge)
I have a progra that retrieves data and then presents a series of problems to solve. The buttons for the problem flow only show up if I put the page into Inspect mode. This happens on both Edge and ...
-1
votes
1
answer
58
views
Why isn't this image taking up more of the screen?
I've been at this for hours and I can't make the image fill more of the screen. Width is set to auto, yet my images are still windowboxing. Max height is set to 90vh to leave room for title and ...
0
votes
0
answers
361
views
Cannot read properties of null (reading 'classList') at window. Onload. Element not in the DOM when the script ran
I converted a page that contains HTML, CSS and JavaScript to a React app. The original website is working fine. But, when I load the React app, I get this error:
Uncaught TypeError: Cannot read ...
-1
votes
1
answer
64
views
How can I specify the structure of a <div> conditionally in JSX?
I'm trying to create a responsive <div> inside a React return() statement, but every way I turn, my code is errored in VSCode. One example of my numerous efforts to structure this (and the one ...
0
votes
0
answers
73
views
Force overflow of table row into next row
I want to create a calendar component which displays the day on the top and the time on the left.
Looking at Google Calendar, they seem to be using absolute to put the events into the calendar, which ...
1
vote
1
answer
120
views
I cannoot get my scroll bar to behave properly in react using javascript, can anyone see an issue?
I am trying to make a react site (first time so forgive me if I have made dumb mistakes and am missing something obvious).
My nav bar is currently fixed at the top of my page it has some basic ...
0
votes
0
answers
1k
views
Is there a way to simulate A4 pages breaks in React?
I have a Page component in my React application with the size of A4 page. Inside this Page component I have multiple different nested children. However I came across a problem.
Problem lays when ...
0
votes
2
answers
32
views
Is there a way to create an circlular design inside a rectangle and adjust the circumference?
I am trying to create something similar to a semi circle inside a rectangle something like this, the ellipse in the background.
expected design
I am able to implement the circle inside the rectangle ...
1
vote
3
answers
872
views
background image (svg) is not loading in ReactJS project
I am making a project in ReactJS. And I am using inline CSS to set background image to my main element which is svg. But this is not loading in the live preview. I have tried many ways available on ...
1
vote
2
answers
65
views
State updates with the old and the new values at the same time
I have been trying to update initUsers values on the DOM so the initial state values it works just fine but when I update initUsers it renders different values from the expected ones.
So basically ...
0
votes
2
answers
605
views
How to apply padding in parent div that doesn't apply on one child
This is what I want to achieve
The white background is parent div, I want to apply some padding on left, right and top, but in such a way that it is not applied on the last child div. How to achieve ...
0
votes
1
answer
437
views
Why is the CSS style not working on my div in react js?
I'm pretty new to react js and I'm having trouble with a div in a component. For some reason, the CSS just isn't working for it. Please can someone tell me what I'm doing wrong?
export const Main = () ...
0
votes
0
answers
218
views
Why is this component not a node?
I'm trying to appendChild() on a div with React. I am pretty new to React so I'm not sure why this throws this error:
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not ...
0
votes
1
answer
94
views
Issues with getting the css class to change based off uid from firestore React
I hope you all are doing well. I was following this fireship io tutorial in building a chat app in react. I updated how I got the data with hooks instead of how it was done in the video.
The issue is, ...
0
votes
1
answer
20
views
Why don't my list items that I made with module css appear side by side?
My react.js codes are here:
>
> function Navbar() {
> return (
> <header className={styles.navbar}>
> <img src={Logo} />
> &...
0
votes
1
answer
236
views
How do i hide the currency symbol when there is no input?
So i am making a create product page. The items were product name, product price, product description. There are gonna be times where user doesnt want to input any price on their product just yet. In ...
0
votes
2
answers
48
views
How to optimize a code that's using alot of props in react?
So, i want to display a bunch of boxes containing text with different colors... To not create a difficult reading code, i decided to create a component that contains this box div. And then reuse it ...
0
votes
2
answers
58
views
How do I move a single item to the right in a flexbox container? [duplicate]
I'm trying to move the "14" that you see in the picture below all the way to the right of the black bordered container it's in and currently it's inside a flexbox container called card-...
3
votes
2
answers
581
views
React make a full-page Carousel
I am trying to make an animation that scrolls from left to right the child elements of a div, I have looked around but none of the other questions with answers seem to work, so far this is what I have ...
0
votes
3
answers
435
views
Styled components inside JSX
I want to make my code cleaner and set a styled component inside JSX code...
Example:
const MyDiv = styled.div`background-color: red;`;
const MyComponent = () => { return (
<div>
<h1>...
0
votes
1
answer
74
views
Css width property is aligning content to the left
What's upp guys, so every time I try to make a border of my inner divs fit the content of that div, so the borders length does not go across the page, the div ends up going to the left of my page. I ...
0
votes
2
answers
416
views
How to scroll up and down line by line in a textarea using up and down buttons with React.js
I have a textarea and two buttons (up and down).
How can I scroll up and down line by line in the textarea using the up and down buttons with React.js.
Something like as if I'm writing a note and I ...