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

Responsive pinterest like gallery

so i need to create this and i have some what succeeded in creating it for desktop but can't seem to be able to convert this to mobile, don't wanna use extra code so can't copy it, even if i do copy it the images are not correctly resizing themselves and the alignment is off in both mobile and desktop, can anyone help me with this one? Reference images (both desktop and mobile): https://imgur.com/a/ZxBC3ci ...
No description

AOS isn't working for child scroll elements

Someone ever have issues with aos (https://github.com/michalsnik/aos) i have element inside body and my body have 100% height and child 100svh so AOS doesnt listen other elements. how can i solve it...

how to add border radius for background image in div block

I have a background image with text on it. i am adding border radius for it. its working. but i see image not filling fully. I tried a lot. unable to fix this. Someone please help me with it. CodeSandbox link: https://codesandbox.io/p/sandbox/awesome-moon-w3sldj?file=%2Fsrc%2FApp.js%3A27%2C2...
No description

Need help with this bugged dropdown

I made this navbar with dropdown menus, it works fine when the navbar is on desktop. While hitting responsive mode, When i click the dropdown, it does work, but when I click the second dropdown, it will suddenly open the link isnide the dropdown. I dont understand why its happening. Also I am using hover class to active the dropdonw...
No description

Help with Clickable Links in Draggable Scrolling

Hi everyone! I’m working on a horizontal scrollable/draggable block with clickable links, and I’m facing an issue. I want the links to be both draggable and clickable. Currently, when I drag the slider, the links are only being dragged and not scrolling; they only register a drag action if I click outside of the link. Here are the specific points I want to mention:...

style for sub item

Hi guys,I'm have a sub item how can I create the style like this?
No description

`@font-face` variable font issue

Quick question, my font-face declaration with a variable font file isn't changing the font weight when I change it via css: ```css @font-face { font-family: "Open Sans"; src:...

Does order matters when defining a class for a parent element and its child elements?

Hello guys, it's been a long time I'haven't touch HTML/CSS and I need to refresh a bit... can someone explain why when I try to change the class from the ul block to the nav block instead, nothing seems to happen please ```css .navigation-bar{ display: flex;...

How do I manipulate tr > td background with only selective rows.

I am using a low code no code tool where I cant pass custom class to particular areas, I have a tr > td >span>a I want to apply background color to this row. Note that I cant pass a custom class to that particular <tr> or <td>. All of the tr > td has a span tag but only some has <a> I want to change background of all <td> under that <tr> that carries <a> tag. Please find the attached screenshot. If more clarity is required or I missed something please let me know so I can explain further. Thanks in advance....
No description

javascript questions

Hey, i've just started properly diving into javascript and have a few questions. 1.) What are the less obvious differences between let, const and var? I'm aware let is used to declare generic variables and const is used for constant variables that never change etc. however i've heard you shouldn't use var but i've also heard it has it's uses in some situations? 2.) Why do functions such as .length not require double parenthesis after it, but functions such as .toUpperCase() do?...

Web design drawing tool recommendation

Hello guys, I'm a complete beginner; I learning HTML, CSS and JavaScript but for the design part, HTML and CSS, I wanted to know if there is any "easy" and recommended tool to use to make my blueprints before starting to code please. Thanks in advance...

Menu Icon not working

the menu icon is not appearing on the right side of log in https://codepen.io/saad-shehzad-the-bashful/details/ZEgYeza...

How do I achieve this?

I would like to know a more practical approach to this type of design. Your opinion is very much appreciated. Btw, I referring to the curve on the background (It's a hero section). Ignore the arrows...
No description

Why my letters' stroke animation doesn't fill completely?

Hi everybody, I just start learning to use svg and how to create some animations with them. So I'm trying here: https://codepen.io/valerio-fluo/pen/gONZmJm , to animate some text. This is an attempt to recreate an handwriting feel. Since I see that the only thing we can near that is to animate strokes, I'm using very thick strokes so they cover the filling of the letters (Sorry if it's not very clear, english isn't my mother's tongue). But as you can see, the strokes don't write themselves completely....
No description

question regarding events in this example

Hello guys I am new at learning js and I am struggling with events a little bit, for example here in this example: const buttonContainer = document.querySelector(".button-container"); buttonContainer.addEventListener("click", function (event) // what is event here inside of the parenthesis {...

Help with React project

Hi I don't know if anyone could help but I have started a project in react js and next js and I downloaded some apps from exaple Mui and I need icons and buttons from mui but when I downloaded I kept getting like 2 items errors out of 2000 downloaded packages or something like that and I tried to ask chatgpt what to do but chatgpt just keeps repeating itself and telling me to : npm force - or npm audit and I did both two but it doesn't help. I guess there is a problem with my json file but I don't know what it could be and I was wondering if maybe someone here would have an idea? “My import Button from '@mui/material/Button';” is kind of greyed out...
No description

Transition on modal.close()

Trying to createa fade out() on my modal when it closes, so that it doesn't just blink out of existence. (the closing is a function as I have multiple dialogs so being able to just call a function is more straightforward and easy to read) Using animation doesn't seem to work, I had put an animation in multiple manners, first I tried modal[close], then I tried to just add a class having an animation .close While also putting the closing in a timeout setTimeOut(closing, 4000)to ensure it would have time to run, didn't seem to work then I read online that it should be with transition, but I can't get transition to work properly for some reason ... I am probably doing it wrong...
No description

how to get rid of chrome default page once user logged in - nextjs

i am using nextjs router.replace once user entered home page. its working great. but issue is still back button is enabled. if i click back btn, it goes to chrome default page. how to get rid of that. anyone has any idea. router.replace({ pathname: '/home', });...

question regarding functions in js

What is the difference between assigning a variable to a function and vice versa?