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

cannot set properties of null innerHTML

hi i have 2 problems in script.js of todo app which i learned from freecodecamp . the first one is when pressing (add) button while the input is empty it supposed to change the text of label of input via a (validation) simple if else statememnt combined with innerHTML but for some reason it consoled (cannot set properties of null innerHTML) . second when you enter a task and press add it appears but when you add the second task 2 tasks will appear . https://codepen.io/ilyas-draissia/pen/ogvWBZO...

Images shrinking instead of text

I have a div with basically three columns: text, an image and a div with two images. Right now, the div with two images is looking like the first image, they are pretty small. I want them to take up the full height (2nd image) at the cost of the width of the text. I've tried a lot of things, but still couldn't figure it out :) Thanks ` <section id="about"...
No description

Image overlay effect

hello anyone know who make this border for overlay ?
No description

how to close a dialog when click on backdrop

Hi guys, I'm learning about dialog element. I wonder how can I close the dialog when I click on backdrop?

Card "flip animation" without position absolute

I was looking for a way to have a flip-on-hover card without using position absolute. So far this solution with absolute is working: https://codepen.io/n00bCod3r/pen/azoJYJP and could be used to provide me some insights on how to achieve what I want I tried using background image on the --front element but unfortunately that didn't work. Please ping on replies πŸ™πŸ» ...

🀏Even less elements?

Heya, i'm trying to make this effect with the least amount of elements possible, pseudos included. Second thing, mind giving me some tips for fixing the antialiasing for these? i tried everything from offsetting to filters but there are still hair thin lines. Still quite proud of my solution, defo not anything to prod tho lol...
No description

Creating Responsive Layouts

Hi guys, I've just started this course from Kevin here https://courses.kevinpowell.co/view/courses/conquering-responsive-layouts I was wondering where I can check Kevin's answers from, as the videos say the answer will be available in 2 days, but I don't seem to locate where I may find them. Thanks!...

Landing pages

Hey! I need to hone my skills by making some interactive, highly skilled landing pages, from where i can clone those? like in a figma file or so? which have both interactivity and elegant style??? Please help!!

Failed to load resource: net::ERR_FILE_NOT_FOUND. Even though the file is present

I cloned crocs home page. But when i open the index file all images are not loaded. Console saying "Failed to load resource: net::ERR_FILE_NOT_FOUND". But on live preview it works fine. What is the reason for this behaviour ? Help me out.

Is it possible to have a 'line height' be dynamic without using media queries?

Ok so I have this navbar I made for my project, and on desktop, I gave it a line-height of 2rem, because it looks the best that way. (I don't want to use padding in this specific case because the way my design works). So, is there a way for this line-height to be responsive as I move on to smaller screens like mobile? I know the default is line-height: normal that does this, but in this case when I'm explicity setting it to 2rem, is it possible to make it scale on it's own, possibly without media queries? Thanks!...

Send generic responses from the api to the client or be more specific in the response?

Example: User Credentials Validation the field password sent it from the client doesn't match the password stored in the DB. Should i send a generic message in the response? like Invalid Credentials or i can be more specific like field 'password' is invalid. Same idea to others validations errors too... should i specifically tell the browser what was wrong with the request?...

Help with css

I need help for css.

Button Border animation

Hey Guys, just a quick question, if i wanted to have a button, with the border and text having a gradient color, with a rotation animation, is it possible to do that with just a button element? I see a lot of solutions with a div but prefer to stay with button if possible?

how to fix the LCP with text

so i'm using vite in laravel to bundle the whole thing; so far i've managed to do different optimizations myself, but this one i couldn't figure out, basically my desktop scores at 99 in lighthouse but in mobile it scores 82 which is not bad but when i checked (i thought it might be a large image or something) turns out it's a p tag; i mean how, especially when i provide a fallback font until i load the custom one (woff2) i'll share with you the code ...

Sticky Table Headers without a fixed height

Im trying to make my headers sticky without a fixed table height. I want the headers to stick when scrolling within the main container. Any ideas on how to achieve this? Ive tried many combinations of overflow-x/y-auto within the table and table containers. My headers are currently sticky and only work if the table has a fixed height. for context: I am using tanstack table (tailwind css)...

How do i strech the size of this element

I want to strech so that if when the title container is thicker the close button has the same height and also so that the close button always have the same width as height.

Separator list method

Hey, I was trying to crack a responsive, dynamic way of achieving elements separated by separators, for example the image below where you may have text and an icon. My idea was to add a border to every even element in the list and a bit of left padding. I’d probably utilise flex to have a wrapping ability but the problem comes when they wrap since you’d then have the border not separating anything and it’d look strange unless I use a media/container query and or js which is less dynamic imo i can’t really counter that. I’d appreciate any ideas since I’m quite stuck atm, thank you in advance....
No description

How to make the anchor tag take up the full space of the list item it's present inside.

As you can see in the image, my anchor tag containing 'Home' only takes up as much space as the content inside it (the text home). How can I make it occupy the entire space of the list item? my HTML code: <!DOCTYPE html>...
No description