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

Selection after the tag

Hi everyone, I have this HTML: ```html...

Radio buttons selected on page load - unwanted

I have a form with a couple of radio buttons. The form is wrapped within a <dialog> element and will be opened only when a button "Back this project" is clicked. When opened, however, the first radio button is always selected and there should be none selected before a user chooses any. Is this default browser behavior or?...

CSS background image issues

Hi, I'm trying to create a responsive website, but one of the pages is giving me quite the hassle in regards to the background image(the man with the kid). I would like some help with my code to make the background image not only responsive and cover the screen, but also have the form below it be on top of the image. It would be greatly appreciated if I could have your expertise on this matter!...
No description

cors error

Im experiencing cors error with my app even though i have cors configured in the backend here is the github repo to my front end for anyone interested in checking it out im having issues with jwt login is what i want to figure out its in src/pages/authentication/login.js https://github.com/leon-kxng/payment_react.
Attached is an image of how i’ve configured cors in my backend and me testing the api confirming it works...
No description

How to get flex to shrink to content for wrapped text?

The following is part of a Vue3 component, using Tailwind: `<template> <li class="block border-b border-b-white/20 bg-white/20 py-2 pl-6 pr-2 text-sm hover:bg-white/30 -outline-offset-4"> <div class="flex gap-x-5px">...
No description

I am looking for a way to merge pdf using nodejs or reactjs server side

I found one, but want to get thoughts outside of my mind.

Huge margin while applying translateX property

Hello everyone, I am using react swipeable to make a swipeable carousel. It works well except when I click the PREV button. I have a big margin on the right that appears before sliding to the left is happening. Do you know how to fix that? Thank you!
No description

Dynamically sized grid with some parts scrollable

For reasons that shall remain a mystery I am trying to create a DAW (Digital Audio Workstation) UI in the browser. One of the main features of a DAW is the arrangement view, where tracks are laid out horizontally with the track info to the left and the timeline to the right, like in Image 1. Although the track heights look fixed/similar in that image, it’s important that they are dynamic and can have different height, for example when you enable the automation lane, like I have done for the first track in Image 2. So far so good, even I could solve this with a regular grid (I think). But the problem is that the timeline needs to be horizontally scrollable while still being part of a dynamically sized grid. The attached video shows what I mean....
Image 1 - arrangement view with tracks of equal height

Server actions help

Different behaviours with same function
No description

Trying to set a scale on title

Hi everyone I realise simple effect on a page who have a title the purpose is when the mouse is on the title the mouse should grow ...

Opacity overload?

Hi, I have been tasked with creating a "back-to-top" button. I have 95% of it working. But I am stuck. And I believe the answer is "you can't do that". But I figured I would ask first to know for sure, and work out a reasonable compromise on what the boss wants... So this button, which is more complicated then just a <button> or <a> needs to meet the following requirements:...

How do I get HTML Color Picker to return RGB values

I am more than capable of converting the Hex values to RGB, but just wondering if there was a setting on the Color Input to automatically return RGB or RGBA values instead of the Hex ones

css grid empty white space

hi guys how do you make this forth and 6th images takes up the whitespace above them? i used display: grid;grid-template-columns: repeat(6, 1fr);grid-gap: 51px; margin: 0 auto; max-width: 1390px;...
No description

CSS Grid Issue

Hello, I'm having an issue that I'm trying to work around without having to rebuild my layout. I used CSS grid to build a marketplace layout, defined by: grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); ...
No description

ReactJS (Tailwind CSS)

I'm trying to work on a modal message. I want to send to my body web page with two conditions, one for the on the success and one on the error. Is possible to render a full component inside the function promise? As additional info I'm using EmailJS for sending the request...
No description

zoom out of page with flex element

How to set a flex parent element so when you zoom out of the viewport the element will stay in it's same position

Can i get this shape with gradients on one element?

https://codepen.io/Miss-Fox/pen/MWRGMZe (this pen has changed, didnt mean to overwirte it) trying to use one background property with gradients sans the pseudo element. Breaking my brain because i need one gradient to go to the right to have that break on top and seemingly one to go to the bottom to get the solid bottom border. Right now i have the bottom border as a pseudo element but i'm curious if it can be achieved all on the .box background property?...

where to get illustrations

Where can I please get illustrations like this and many more please?
No description

Trying to embed Twitch video but error occurs

This is the code I am currently using on the html file: ```html <div class="twitch-frame"><iframe src="https://player.twitch.tv/?channel=untitledgamestudios&parent=www.ugs.pt" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe></div> ......
No description

How to efficiently validate multiple properties

This could go in backend just aswell I realize. I will try to be a bit generic because I think the issue is not tightly coupled to my specific issue but more of a pattern that one can do. I have an object, It has a bunch of properties. I want to check if certain properties have a truthy value. What I do now is I just have a bunch of if statements that go through all the properites I want to check. And add a message to an array. I feel like there should be a better way to do it, some kind of pattern matching, or something. That's not as gross as what I am doing and is more maintainable. But not sure how to even start searching for it so I ask you guys if you have tips....