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

Creating a resume with code - is @page the best option?

I'll likely have to print off some hardcopies and I've come across the below code when searching for ways to do this, but i've never encountered nor attempted it, so wanted to know if there was a better solution here, or if this is the way? ```js @page { size: A4;...

how to: receive mail from user contact form?

Anyone know the easiest way to fix a working "contact form" with react where the user can fill in a form that is then sent directly to my email? Not through <a> mailto etc.. Have seen someone use React emails : I think they seem a bit complicated.. ...

Hover effect not working

I want to add hover effect on tab icons on left side as you can see that there is a hover effect with bg-color blue .But i am unable to add this do not know why codepen link"https://codepen.io/Talha-Mustafa/pen/YzRdPyR

Intersection Observer Animations feels jumpy

Hi! I have created this site https://sheaco.com/ Intersection observer works however the animation feels a bit jumpy. when site uncached the animation goes downward squeezes then pops up. I am not sure how I fix this?...

Angular course

Hello # I want to learn Angular and would really appreciate any advice on courses that you found useful and easy to follow. Thank you🤩⭐

How to vertically align label next to input form in flexbox CSS

Hey guys, really sorry for wasting someone's time on this probably stupid question, but I couldn't find a solid answer after 2 days of research by myself: I am trying to build up a simple form using flexbox. But the problem is that label (specifically in flexbox) isn't pixel perfect centered next to input form (which is usually not a problem with inline block elements.) I am basically trying to line up placeholder text to label text so they would be on the same line, while in my example (see the img i attached) placeholder is slightly higher than the label. I found few tricks setting up line-height and vertical-align: text-top, but as far as I understood they only work when you use inline-block elements. AFAIK using align-items:center in the flexbox parent should fix aligning problems on the main axis, but it didn't help. ...

Issue with centering button text

I have a button with the following direct styling. The internal text will not center and I have tried various methods, but the goal is to align the internal text both vertical and horizontal. TRIED: padding: 0; padding: auto; Here is the entire code...https://codesandbox.io/s/ict-birthday-list-fdh3kc?file=/index.html...

Whitespace when line-wrapping

I have an element that is forced to line-wrap due to width constraints, but this causes unwanted whitespace on the inner-right end of the content box. How do I ensure that there is no whitespace, regardless of text length? I cannot change the structuring of this, only CSS. Word-breaking and hyphenation, justified text and width: min-content cannot be used, either. Link to codepen with structure: https://codepen.io/yayokb/pen/OJarRVe...

document.getElementById() not working

Hello, I tried to use event listener on an element but document.getElementById() returns null instead of the element. The problem is that I can't find any problem and I tired the code on multiple online compiler and it worked in all of them but it doesn't work on VScode. HTML: ```html <!DOCTYPE html>...

:last-child and :not pseudo classes together

I have a bunch of list items inside my <ul> all of which have class of "level0 level-top parent". However, the last 2 list items have an additional class called "mobile-nav-only" as well as "level0 level-top parent" I want to add some CSS to the very last <li> with the class of "level0 level-top parent" BUT ONLY if that li does NOT have "mobile-nav-only". I believe I need to combine both :last-child and :not pseudo classes but I'm struggling to figure out the correct syntax. Any help appreciated, thank you 🙂 ...

How to open new content right side

As you can see there are tabs on left side . How can i do something like whenever i click on a icon on right side a new page should be opened

TailwindCSS extended base style overridden by unknown style

Hello everyone. I had an issue with my React + Tailwind + Vite project. The problem is that I tried to extend the base style of my heading elements (h1, h2, ...) and somehow only the font-size is not being styled properly. I checked on the browser developer tools, the font size is overridden by CSS that I didn't write (see attached image). I tried to: 1) Clear the cache 2) Remove node_modules completely and rerun npm install...

Flex grow but equal width

Hello there, first of all, here's my code: https://jsfiddle.net/KonerDev/14k956wz I'm not completely satisfied with the code because not all cards have the same width. The last ones usually have a larger width since they still need to take up the entire space due to the flex-grow property. But I want all cards to have the same width. How can I achieve that?...

the weird behaviour of multi level horizontal navigation menu when We remove "position:relative"?

The below one is My code for multi-level horizontal navigation menu and it is working fine https://codepen.io/siva-charan/pen/zYmzwOM My doubts are : For the below code : https://codepen.io/siva-charan/pen/vYVZmyG...

Vertical line to take 100% height of the box

I want the box to take the 100% height as in the picture what should i do here is the code pen link"https://codepen.io/Talha-Mustafa/pen/YzRdPyR

div goes down when i put text in it

so basically i have like a div and it has a lot of images inside it along with another div(lets call said div "bob") so basically bob is inline-block and bob is fine on its own and the top of bob meets the top of his parent div and the bottom of bob meets the bottom of his parent div, but whenever i put text inside bob (ex. <div class="bob">hello im bob</div>, or <div class="bob"><span>hello im bob</span></div>) bob shifts down so that the top of bob is somewhere in the middle of the parent div...

Multi-Page Apps, how are they typically built?

My understanding, from a vanilla html/css/js POV is that it's a html/css/js file per page, but that's my thought 3-4 years ago when I started coding, I haven't looked into it since, so, is there an alternative? how I see it: ```js Homepage:...

react state not updating inside a hook (useSound)

I'm trying to add a loop feature on a spotify clone where I hold a state isLoop and control it using a button. however it is not reflected inside a method of a hook 'useSound' which uses howler.js. I've attached the code as file. There onend method of useSound hook doesnt gets the updated state....

Fit background image vertically and horizontally

Hello guys I am ashamed that I am still struggling with fitting background images in both directions (vertical and horizontal). I have used background-size: cover; and it will strech the image in both direction, but what I am not liking is, my image cuts off in bottom and I don't like that, I have an image with Full HD size. I just wanted the whole part of image to be shown regardless of size of the screen.

beneficial option

Hey there, i'm trying to recreate this design. I was wondering if setting a fixed height and width for the animal images would be the most beneficial option as the size only alters a small amount per device view. I know setting a fixed height and width on containers is mostly a bad practice but as i don't have any child elements that dictate the height and width of the divs containing the images i'm not too sure on the best option whether that be setting a fixed height and width or using a perce...