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

confusing info

What does min-width :0; in this exemple really does, looks weird cause it's like including overflow-x :hidden; but instead bro really includes min-width which make no sense thou 🤔
No description

How can I create a submission page?

Hey there I wanted to recreate this "Contact Me" I found but the issue is I don't really understand how it works or what is required in order to achieve this...
No description

Making a paragraph fit it's content

I have a <p> element, which I'd like to add a max width to, and also have text-wrap set to balance. However, applying these properties creates extra space on the right side of the element, which I'd like to get rid of. As you can see in the pen below, I've tried adding width: fit-content, but it doesn't change anything. What should I do to fix this? Here's a pen: https://codepen.io/samalander0/pen/ZEPLjzm...
No description

How to align the header and footer for a page

1. I have page with two sections divided in b.w , if I want the header on the left to have the background-color of black (same as section 1 bg) and header on the right to have the background-color of grey (same as section 2) Need to achieve something like this - 2nd image...
No description

Centering absolute element above relative parent element

Hi! So I've been scratching my head a bit, I'm making a tooltip that is position absolute that I want centered and above when hovering the icons, and the content of the tooltip is of varying length so I cannot set a static number to hack it. This is the code for the tooltip : `.tooltip { position: absolute;...
No description

Why align-items: stretch, is not working in this case

I want all the cards to have the same height, because they have different titles sometimes might be that a card has 2 rows title hence more height, but I want the other to stretch to it, but it is not working Here is a simple sandbox https://codesandbox.io/p/sandbox/card-ys3pl3?file=%2Fstyles.css%3A75%2C1...
No description

LIST ELEMENTS, EDITING BULLETS

Hello, I'm quite new and I wonder how can make layout from picture below into the one below it. Main question is how to align text height with bullet svg and add spacing between bullet and text
No description

How do I destructure an object that extends multiple interfaces into each of those interfaces?

I'm looking for a way to extract the props, for each interface, from an object that extends multiple interfaces. The use case for this is where I've created a composite component and want to expose all the properties from components A & B on C. ```typescript...

Difference between <Doctype> and <!Doctype>

I recently gave an interview and was asked the question to tell the difference between
<Doctype>
<Doctype>
and
<!Doctype>
<!Doctype>
I searched on the net but there is no answer. Can someone help me with this?...

Responsive component with overflow scroll (Tailwind)

Hello everyone! I wanted an element which takes the entire space available but it should not overflow and increase the page height. I am unable to think of a solution without giving it a specific height which defeats the purpose of it being responsive. Somehow this code worked but I dont know how (Check images, the highlighted part is the "ChatDialogs" component in question) ...
No description

Union of literal types from an array of strings

Hi I'm looking for a way to generate a union type for every string in an array. Let's say I have an array const sample = ["apple", "banana", "grape", "orange""]. Basically I want to be able to get type SomeType = "apple" | "banana" | "grape" | "orange". I need this SomeType because I need to create a function that accepts one of these values instead of typing them one by one like this ```ts...

Having problem with transform-style: perserve-3d

I'm having this problem where i use transform-style: perserve-3d and it didn't have any effect on it, the document said that is apply to that children element, - I tried !important - Tried switch the properties to the parrent and it didn't work I took this code base on Kevin video right here...

@use instead of @import

So my dilemma is I used to import a _header.scss so it could have all the code for the nav in that area but how would I do something like that with @use since sass is trying to get away from @import 😉

How do I overflow/breakout a side menu item label?

Hello, slowly improving my CSS knowledge but trying to work out a "classic" case of breaking out a collapsed side menu's label on hover. I'm not sure how I can achieve this with the current styling and HTML I've put in place so far. From what I've read, I need to make a parent element position: relative and then make the label element position: absolute to break it out? I could be totally wrong here of course 😄 . CSS & HTML can be viewed at the link below:...
No description

2024 css reset

Is that actually a good practice🤫
No description

Sidebar is pushing down my content and creating whitespace

CSS, Bootstrap 5 You'll notice I have made it so when I collapse to mobile, the Features sidebar slips under the black highlights box (where it lists engine, suspension, etc. stats). If I made the sidebar collapse to the bottom, I don't think this would be an issue but I need to to appear under the highlights box on mobile. So when the sidebar grows too long vertically, you'll notice this large white space...The DIV on the left is growing to match its neighbor, the sidebar... https://codepen.io/valdortheshield/pen/poYNMMw...

Can someone help me to create neon light

I want to create a touch which can give a 3d glowing neon light in cylinderical pattern like behind the man can anyone help me with that
No description

Animation problem

hello guys, I am working with my self project, I just want to make my btn background is to make animation, and I dont know why the animation is not working. heres my code for css and my html. can u check guys whats wrong in my code. Thank you!
No description

Why moon-icon not in the right place?

Hello, I do not understand why "moon-icon" not in the right place Here is my code: https://codepen.io/lanszelot/pen/YzgpmzL Here is how it have to be /image/:...
No description

Margins Not Shrinking?

Hello guys, soo I'm working on a hotel site and I'm having trouble with making only the margins of my container shrink, when ever i drag the screen towards the mobile size only the content of the container shrinks and not the margins. My ideal scenario would be the margins shrinking until the content meets the side of the screen and then I use a media query to adjust the width of the container and so on... any help would be much appreciated 🙏