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

Cells growing unexpectedly

When I click on one of the cells it adds a paragraph with a "x" or a "o". The issue I'm confronting is that the columns grow when it is populated by a paragraph, why does it happen? How can I prevent it? https://codepen.io/leoncelestino/pen/zYVoMQz...

nth-child, index()

Hello everyone , I have 23 divs each containing 210 spans. When I click on a span with certain number it gets a red outline as a highlighting and I want to copy this outline to all spans with this number in all divs. So far I have this code using nth-child and index(). It works but the problem is that index is 0-based so when I click on a span number 2 I get outline on span number 1. I know there is a trick with adding +1 but I can't figure out how to add it in this specific case. And I don't kn...
No description

Need Help with Creating a Rotating Advertisement Stripe on My Website

i'm trying to create a rotating advertisement stripe for my website, but I'm having trouble getting it to work as intended. I've set up a CodePen with my current code. Could someone with CSS expertise take a look and help me complete it? Here is the link to my CodePen: https://codepen.io/deepk2891/pen/RwzoBKQ?editors=1100 i have provided image what I'm aiming to achieve in codepen output....
No description

Why does a jpg link take up more vertical space than just the jpg?

I have the following code: ``` <!DOCTYPE html> <html lang="en">...

grid-template-rows with named columns for advanced/flexible/automatic layouts

I am trying to make some components (like cards) more flexible by using grids with named columns / named rows to place content with some sort of paddings, but without the need of using paddings.

JavaScript E commerce shop

Guys i wanted to ask u something i am working into a React project but I am finding it hard to implement cart logic so basically , I am using redux to add and remove items i am finding it hard to do it by myself is this common?

Create multi coloured border box using conic gradient

Hello, Folks πŸ‘‹πŸ» Problem: I'm struggling to add a multicolored border box around a black box content using a conic gradient. Context: I have a paragraph tag that contains content, and I’ve styled it to transform the paragraph content into a black box. Then, I added an imaginary box behind this content box using the::after pseudo-class to create a multicolored border around it with a conic-gradient....
No description

Styling React E-Commerce website with Tailwindcss or Material UI or both ?

Hi guys, I'm working on a freelance project of e-commerce website at frontend. I preference use both Tailwind and MUI in my project. And I want to get idea from you guys it is to complicate to use both of these in project. Share me your ideas. Thanks alot !

Ordered list base styles: is there a better way?

OK, this works, but it's ugly. Is there a less ugly way to implement some default chain of styling decimal > letters > romans > decimal… ? ```css :where(ol) { list-style-type: decimal;...

Can't pass props onto another component

in my App.jsx component, I pass the Template component the following props, but inside the Template component, I can't access them, idk why or what I could do ... Help!
No description

mobile view - scuffed?

I'm not entirely sure why this is like this, or how I fix it...? any ideas why the elements are only showing like 80% of the width?
No description

Adobe Photoshop

with Adobe photoshop, how developers interact with the platform

What Figma says

Hello, guys! I want to know what figma says here. For me it says that there is an image with background color of lightgrey 50%, but the designer says he's not puted any background color on it
No description

Running into an issue while messing with the allow-discrete for animation feature

I'm need to build a collapsable alert message and thought I would try to mess with transition-behavior: allow-discrete; to switch the alert message to display none when it's collapsed. The issue I'm running into is going back from display none to display block. I want to delay that animation a few milliseconds but it seems like the delay is ignored for display. Does anyone know if delay doesn't work with allow-discrete? I've tried using @starting-style to set it's display to none but that seems to be preventing it from going back to display block. Here is an example of what I'm doing. It looks fine when it collapses but switching back to the default state causes the text to wrap before the animation ends because it is immediately switching back to display block instead of being delayed until the alert grows to full width....

Making transition to new screen smoother

I'm making a todo app and I've designed it so that when I press the add button a new screen appears. Like this (https://gyazo.com/cb7d487262c55342077216c52b830407). But the transition is too 'blunt'. How do I make it smoother? For reference, I'm using React + Tailwind; this is the relevant code that adds the screen....

Is adding max-width to a text a good way for a line break design in css?

i was trying to copy kevin powell's challenge 3, at first i was trying to figure out how to add a line break just like in the challenge 3 video, "Response layouts don't have <linebreak> to be a struggle" and came up by adding a max-width of 650px for that, same goes for the paragraph, i added a max-width of 520px .container { width: 100%; background: #23424a;...
challenge 3

What would be the best approach for my React Resume Builder?

As you can see in the screenshot, I want my user to be able to add the education he had and experience, but let's say he has multiple fields of study/multiple jobs he worked at, I'd need some guidance to understand how I could build it, because each field would require to duplicate every item inside my useState, so basically if he worked at 2 jobs, how would I code it in a way so there are multiple "companyName, positionTitle, etc." ? Thank you!
No description

WELP!

i can make this layout using flexbox and wrap it? BUT how do i write on the images like "soccerVR" its written on the image
No description

On focus border changing component size

https://gyazo.com/90ba846f18909e47d3112f2ff377c829 When I focus on the input, the border is added, but for some reason, the other components change their size accordingly. Is there a way to prevent this from happening? Here is the code for that particular element. Its parent is a flex container, for context....

restrain image height

Hey, I have a grid layout with an image and text. There's two rows, 100px and auto. I'd like the image to span the first row and the second, being the combined height of 100px and the height of the text, but i suspect since the row is auto it's using the images default height and being taller than i'd like, how would i get around this? Thanks in advance. https://codepen.io/deerCabin/pen/WNqGmGq...