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

CSS Grid not resizing on media query with new grid-template-columns

Full disclosure: I'm working in react using react.modules.css file structure. I originally set up my grid-template-column as 1fr 1fr auto 2fr and I'm trying to change it to just a 1fr 1fr structure at smaller screen sizes. Not entirely sure what I'm doing wrong. https://cherished-moments.vercel.app/ current deployed version of the code....

Could these scalable backgrounds be made with css?

I'm pretty inexperienced with css backgrounds and it always amazes me what people who are experienced with them can create. So I'm curious whether the top 3 shapes could be made in a way that easily scales to accommodate the content like in the two examples beneath the 3 shapes without the need for magic numbers etc
No description

How to make text color adapt to progressbar

I am making a custom progress bar. In the center of bar, text is center. As the progress fill, text color should be black on filled side and white on unfilled side. is that possible? i have attached the figma image and my output image. I dont know how to make that text color change based on background. Can anyone help me Codesandbox Link: https://codesandbox.io/p/sandbox/react-new?utm_source=dotnew ...
No description

Responsively fitting text to full width of container

I want to create a title where the font size dynamically increases/decreases to fit the full width of the container, which also responds to changes in screen size. After poking about on stackoverflow and not really finding a one size fits all solution, I'm wondering instead if there is a package for this? Thanks a lot!...

What approach can I use to achieve this using tailwindcss in my react project?

I have tried using positioning but the spacing between the contents and shapes are not matching the design especially when I tried designing for the tablet screen size. Thanks in advance for your assistance
No description

why isn't overflowX:hidden isn't being applied when toggling device toolbar

so i want to test the design breakpoints so that i can apply the different break points; but something bugs me; the device toolbar (the thing that had a laptop & mobile icon in the chrome devtools) isn't respecting the overflowX:hidden; rule applied in body; i wanna do responsive but i don't know how to do it if i can't focus...

need help with radial reveal animation like example

I tried to recreate this radial animation but not able to achive the exact style can any one help me with this please https://codepen.io/Ullas-Kunder/pen/rNXRxgB...
No description

Can't center the display: inline block;

I tried a lot of combinations of CSS parameters, but none of them gave me the desired result. The task is to automatically center horizontally. navbar-menu class relative to the screen or navbar. Since the code is small, I couldn't think of anything better than to send it all for the full picture. The classes you need are listed above. I don't speak English well and use a translator. Questions about the wording are welcome https://codepen.io/pen?template=eYqxXrM...

Slider with visible sides on the left and right

Hello guys. I need your help pls. I need to build a slider with partially visible sides like the apple one on this link https://www.apple.com/ How can I do that. I have tried creating with some chatgpt code when I add on my website its not like the apple one. https://corporate.kabum.digital/...
No description

Position the image to be fully visible in the viewport and disappear on scoll

I have this mascot... I want it to be fully visible on the viewport but when I reach the green grass it should go along with the grass. I managed to have it go with the grass but I am not able to make it fully visible. I tried position fixed but it remains fixed when we reach the end of the container I tried with js but still no solution....

Need Help with Christmas Tree Growth Animation in React! ๐ŸŽ„

Hi everyone! Iโ€™m working on a React project and could use some guidance. The design involves a Christmas tree that starts off small and gradually grows as the user receives "appreciations" or points. For each appreciation, an envelope icon attaches to the tree as if itโ€™s a decoration. I've attached an image for reference. Any advice on how I can implement the tree growth animation and dynamically add envelope icons to it? Would love any tips or resources on achieving this effect in React!...
No description

how to re render react re usabelcomponent

So I have an resusable component for Toaster notification with message , color property for now I only make with message So In that Toaster , it contains message and close icon button so whenever I click the toaster would go off (false) but whenever I get message propes I set useEffect with setShow true So the problem is if I get same message again It doesn't show the toaster ...

@media | print, screen & only

Hey, i have a couple questions for some @media rules- 1) What type of things/content on your site would warrant changing in regards to the print rule? essentially, what would you want to change when printing out a page of your site? 2) i've heard the screen rule represents exactly what it says, being a screen of a certain size. That makes something like @media (min-width: 500px) different since it refers to a window size right? but aren't they technically the same? ...

Portfolio Feedback

Hi Everyone, I'm self taught, I've applied to over 100 jobs and haven't heard anything back. I was hoping to maybe get some feedback on my portfolio and the one project I have? I'm not sure if its good or bad or what I'm doing wrong....

Are the Courses on KevinPowell.co upgradable?

I'm looking into the Courses and see that CssDemystified has three tiers. bronze silver and gold. If i buy the bronze and want to upgrade to the silver or gold, is there an option for that? Also, i was doing one of the free courses on Scrimba and I was blocked or locked out due to 10 free sections of the course. So now i have to pay the PRO membership to finish the course. Is that how its supposed to be? And if i do the Css Demystified course, do i have to have the Pro membership on Scrimba also...

Radial Progressbar w/Rounded Square Caps?

I stumbled upon this CodePen and really like the design... It's easy enough to do radial progressbars with circular caps, but I can't think of a way to achieve it with rounded square caps. Anyone know a way to accomplish this using CSS/SVG or perhaps a library that can already do it cleanly?...
No description

When to use rem and em

Hello guys, I'm currently learning how to build responsive design and I came across that we should try not to use the px units to build responsive designs; only keep that for small things, like logos etc...We should try to stick with units like ch, rem and em. From what I understand, rem is the font-size relative to our root element, the html element and em is the unit relative to the nearest parent element. But when should we choose to use rem rather than em....

How do grid lines work in CSS grid?

Hello guys, sorry to disturb you all; can someone explain how the CSS grid lines work please; the thing I'm not understanding is why the grid lines (represented by the black line) doesn't start on the edge of the rows or columns but before the rows or columns, like in the gap, I'm very confused about that. It is like if our grid-container has a padding and the black line is drawn in this padding. Second is why we always have 1 more row grid line or 1 more column grid line that actual number of rows and columns....
No description