Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.

Join

front-end

resources

back-end

ui-ux

os-and-tools

help

innerText is undefined

I am trying to code a very basic shop for a school project and I tried to get the price of a product by using innerText in a function to update the total price in the cart but when I checked in the console I get this error: caught TypeError: Cannot read properties of undefined (reading 'innerText') The function code: ```js...

Need help creating some smooth transitions between animations & scenes

Hi all 👋 I need some help. I'm trying to add some transitions but am not sure how to add them with/alongside/in-between things like My animation and the ThreeJS Scene that's on My site at the moment. I've added a .mp4 video/clip of how it currently looks and functions. How I want it to look and function: I want to make it so that, when I boot up Electron via the npm start command in Windows' Command Prompt (as shown), it will start on a Solid Black Screen (/Background?) and then smoothly transition into the animation (The bit with the grey background and yellow circle logo (Which btw is temporary)) / make it so that the animation slowly appears on screen then it plays from Start to Finish....

Is there a DOM-XRay type of Chrome extension that will work with React pages?

I just noticed my DOM-XRay is not working, outlining the borders of my React components, the way it normally does for regular HTML. Is there one out there that will?...

Converting Figma interaction to code

hello everyone i'm currently attempting to make this Figma animation with HTML & CSS (not sure this is the best approach but i've attached a gif below) this is what i have at the moment but i'm not even sure how to proceed - https://codepen.io/DayoAwobeku/pen/gOBVvxw...

ReactDom.render() vs createRoot

Setting up a very basic React component and I notice in the console I'm getting an error saying the "ReactDom.render() is no longer supported in React 18. Use createRoot() instead" though 18 is the React version I'm on, and it does appear to work......

Horizontal scroll section

Any way to have the width of the section with horizontal scroll bar to be as wide as the content? Currently when using width: 100% it takes just my screensize.

How create context with TypeScript (solved)

I want change number in Numbers.tsx component using context Here is codesandbox:https://codesandbox.io/p/sandbox/fancy-resonance-kwr7um SOLUTION How create context (to learn - repeat after this guide)...

gap vs margin

regarding the latest video on gap vs margin at the end there was the spacing between those form-groups would there be a difference (in outcome or styling semantics) if instead of ```css form { ...

Newbie question, in this example how will I code this circle like floating. in sec 1 and sec 2

I will use floating or position absolute in css to make it float? in section 1 and section 2 like in this image example, hope you can help me thank you

Mobile virtual-keyboard pushes up content

I have an html layout / css problem in a basic chat application. There is a page with a chat-header a chat-body and a chat-footer. Body contains the messages, it is scrollable, the footer contains the text input. When the user clicks on the text input, the entire content is pushed up on mobile, and i can't see my header. ...

Object-fit: cover and layout help

https://codepen.io/vince1444/pen/XWxvbMo I want to make a layout that will not have any scrolling. The layout has a master grid, and inside that grid are 2 columns, one for the left-hand about me section and the right-hand column for the projects and testimonials. The projects and testimonials section is a grid container, and inside the grid container there are 2 columns, where each column is a flex container. The problem lies in the images. When I add the images in, and when I give them a width/height of 100% and object-fit: cover, it does not maintain the layout. It makes the layout overflow and scroll. ...

Time delay for animations

HI everyone I want make this animation but without gsap only with css I want the title appear first after the image after the other lines step by step but something is going wrong with my work...

[Angular MaterialTable] Row class not completely applied in case of overflow

https://stackblitz.com/edit/angular-mat-table-highlight-row-on-scroll-zmdjqj?file=src%2Fapp%2Fapp.component.css As you can see, due to the Flex css part, the row class is not entirely applied. Any idea on how to do that? The flex part must stay, this is a simpler example than my actual project......

how to fix alignment using flex box

hello I am trying to create a patient details modal. First Name and Last Name looks good but age, sex is not align with the first name and last name and phone email too but city and state is okay with first name and last name.

Hover effect

I want realize a hover effect menu an image should appear behind the links but the problem is the background is not center behin each link What should I do to center the background https://codepen.io/alpha_66/pen/RwezEGd ...

svg in the div still showing when the container height is 0

hey folks this is my code ``tsx <header className={sticky top-0 z-[3] bg-white`}> <div className="flex justify-between px-16 py-4 h-0 bg-gradient-black-green"> <div className="flex gap-4 items-center">...

grid-template-columns auto fit not working as expected

```css .videos__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); place-content: center;...

Chatbox

I wanna create a chatbox w/ scss n vanilla js but i'm struggling with making it so that it scrolls to the bottom when a new message is received Codepen : https://codepen.io/RS_2009/pen/NWOZRWq...

What is the difference between text-properies and font-properties?

As of My knowledge text-properties are applied to entire text within a tag where as font-properties are applied to individual character.Am I right?

Tailwind CSS transition not working.

```html <div class="mt-6"> <p class="text-sm">Or sign up with:</p> <div class="flex justify-center mt-2"> <a href="#" class="bg-white rounded-full flex justify-center items-center transition-all duration-1000 ease-in-out" id="googleButton">...