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: How to: Flip element on hover, keep end state, then reverse on next hover

What the title says ☝️ I have tried to make a pen, I don't understand why it does not work: https://codepen.io/ingvild/pen/OJKyzBy I think this is a pretty "fair" request, and it should be easier to solve in CSS, so anyone wants to contribute? ...

me help in css just fix this img

it's not working the icon in nav! ```html <body> <nav class="navbar"> <img src="./images/frieren-icon.png" alt="frieren-icon">...
No description

Javascript not changing P element

I'm having issues trying to understand why my javascript code is not updating the paragraph in my html. When i type the age number in the input field and submit its supposed to display a message on the paragraph. I've tried to look at the id for both and noticed they are the same. If anyone could help me understand why its messing up i would appreciate it. https://codepen.io/Jwfrank3/pen/mdNeMro...

help vite proxy running in a container

I used docker compose for frontend and backend, and i tried connecting to http://backend:5500, which works, but in my vite proxy i tried setting it to that, and it didnt work. Its probably because the request is made on the browser, not in the container, so I put http://localhost:5500 as the proxy but that doesnt work. If I directly do fetch ("localhost:5500 / ") there is no problem, so im thinking vite tries to check if the proxy is valid. heres is my vite config...

How can I compress the space underneath the element in the first column and first row

Hi everyone! I'm trying to recreate a small demo of a functionality where there's a navigational tab menu and each below that and also a small card that should be sticky while scrolling down. I have two problems that I'm struggling to solve:...
No description

:nth-child(odd), :nth-child(even)

See image. So the idea is that the - becomes the color red on hover and the + the color green which should be simple bc the - is the odd child, the + is the even child...
No description

Feedback on a CLR course challenge

I solved challenge2 of the flexbox challenge of the CRL course. How did I do it regarding naming and my css ? Code: https://codepen.io/RoelofWobben/pen/PoMPzOd...

Why is my codepen messed up.

Hello, I tried to do the first challenge of the CLR course about flexbox but my layout is totally messed up. It looks the css file is suddenly not found. ...

Nested stacking context using z-index

Hello guys, sorry to disturb you all; normally, when we have a nested stacking context, the child element shouldn't be always below the parent element stacking order even though it has a greater z-index? ```HTML <!DOCTYPE html> <html lang="en">...
No description

Problem with using percentage as a unit with respect to the min-height property

Hello guys, sorry to disturb you all; can someone explain why my box1 isn't appearing, it's like it doesn't have any height because when I change the height from a percentage to another unit, it works well, but not here ```html <!DOCTYPE html>...

table tr:nth-child(odd) pseudo class not targetting only odd instances of particular tr element

Hello guys, sorry to disturb you... I was trying to use the nth-child() pseudo class to make odd numbered of rows have a different font-color but row 1 is being changed to the different color which is correct but row 2 is also being changed to a different color, can someone explain why please ```html <!DOCTYPE html> <html lang="en">...

final CRL challenge

https://codepen.io/saad-shehzad-the-bashful/pen/jOgbERL I haven't made the menu yet as I don't know JavaScript. Is there any video someone can provide me where I can learn how to make a simple menu, or would someone be kind enough to make me a simple menu?...

Why is my layout messed up on mobile

Hello, I wonder why me layout is messed up on mobile. Code so far: https://codepen.io/RoelofWobben/pen/BaXoydN...

Odd number of cards

If I have a 2 column layout with an unknown number of cards, how would I make the last one spans the two columns if the space is empty? Going a step further, if as in some of Kevins tutorials I had some feature` cards that span 2 columns, how would I ensure the last card spans 2 columns if there is space? Many thanks...

functions with return

Hey, in a course i'm doing, there was a question asking that you create a secondary array with the original array items lengths. The solution i added is what's inside of the function. However, it wouldn't register as being correct unless i put return before strings.map. I'm not really sure why it's important that's there. Is this because that's how it returns the array it creates back to you? And with the second return returning string.length, it that how it pulls the value it's looking for? ```js function getStringSizes(strings) { return strings.map(string => { return string.length;...

Semantic html for contact block

From semantic perspective which tags should be used for blocks like phone: xxxxxxx ? ```html <li> <h2>phone:</h2> </span>xxxxxxx</span>...

Text decoration

what is the purpose of text decoration in styling? Isn't it the default? So is there a purpose of writing it in code?...

Background image not covering the whole page in mobile Chrome browser.

I guess the address bar cause the issue I tried to give body and html 100lvh but it does not worked. This is the properties that I'm using: ```css body {...

How to learn HTML/CSS/JavaScript in order to build projects

Hello guys, sorry to disturb you all; I need to learn HTML, CSS and JavaScript for my module. I'm using MDN docs to have a good fundamentals but the thing is I need to go faster because I have courseworks to do and I can't take too much time... going fast will mean skipping important concepts but I want to learn everything well and deeply because for sure I will use them later on but I don't know what to do... if I learn them deeply, it will take me too much time and I'm not even sure to finish...