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

Make Responsive Design with Rounded Image on the Edge

Hi! I've been taking good looks into Kevin's tutorials, and in one of his tutorials with Figma, I came across his layout / design example, which was the image I posted here. If you were to implement this kind of design layout, how would you make this responsive? Thanks in advance!...
No description

Code Help

Hey Guys, I need your help in following Javascript code. I want my input field to format values in this format. +92 ###-####-###
`function phoneFormat(input) { input = input.replace(/\D/g,'') var size = input.length;...

Checkbox innertext not showing in webkit, but works fine in Firefox?

Before I spend any more time trying to unravel this, I figured I'd ask here in case it's a common issue. I have a custom-styled checkbox to look like a toggle button. This is just an <input type="checkbox"> with some innertext. It works as expected on FF, but collapses on Chrome. Even manually setting the width of the element does not show any text, though it does exist in the inspector. Is this just a limitation/ quirk of webkit? Or am I missing something else?
No description

Double images

index.js ```js import logo from './logo.svg'; import './App.css'; import { useEffect, useState } from 'react';...

jQuery Library Conflict (TamperMonkey)

Hello all! I'm writing a short little script for a website I use frequently using TamperMonkey. I'm coding in jQuery, but the site uses a different library. These two libraries conflict and break some of the site's built-in coding (all my customizations work). I went through this https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/ and it seemed perfect for what I was trying to do, but TamperMonkey insists that jQuery is an undefined function and cannot be used. When I force it to run on the site, it throws a console error as well. This is what I have so far, with the main code snipped since it's not relevent. ...

Passing Objects in Native Web Components

I'm trying to learn Native Web Components and would love some help with this problem I'm facing. I'm trying to pass a simple object literal from the dispatch-data to the recieve-data component by listening to the event. However so some reason I can't get the recieve data to listen to the event using the this.addEventListener, but I can using the window object. ...

Grid last element

https://codepen.io/LCSNeo/pen/VwggLRO I am trying to move the last li item to the bottom. I tried align-self but it doesn't seem to work....

Brotli compression in next.js

Hey guys I'm working on brotli compression in next.js and I need your help Problem: The compression works fine, I can see the [filename-hash].js.br files in the _next/chunks. But when doing npm start, the production build doesn't have the .br chunk files. ...

Animate pages

Hi guys, I want pages to animate when you come to this part of the page. For example container 1 insert from the right when you are on this part of the page. Anybody who can help me with that. ...

Firefox Chromium diff when using Subgrid

Hey guys, I've been working on my second website for a customer and I realised I have an Issue with my layout when switching from Firefox to Chromium. As you can see the same code is working well in firefox while in chromium based browsers, edge opera chrome. The layour of the subgrided cards just breaks entirely....
No description

Unexpected position of ::before element while animating.

I have a drop down menu that is being shown and hidden using transition. I have custom css for radio buttons. I have created checked state for radio button using ::before. Even though i positioned the before element center to the radio input, it is being shown somewhere else during transition and I have no clue. Please find the attachments for more detail. Help ples 😦 site: https://reetro-coder.github.io/moco/...

og:image for WhatsApp is not working

I have implemented the open graph image using the <meta name="og:image" content="assets/og-image.jpg"/> tag and it was functioning properly until recently when I noticed it's no longer working on WhatsApp. The og:image is appropriately sized at 1200x630. I'm hosting my site on Cloudflare and what's peculiar is that I've used this exact code for several other sites; it seems to work for some while it fails for others. Can anyone suggest how to resolve this issue?...
No description

advent of code help

I am trying to see if anyone can help me redo my code I am struggling with my code. It seems like it worked but then it does not ``js demoData = two1nine eightwothree...

Table border problem

In my django project I have a table and I have this issue where there is a angled corner when I have done border-radius (I know its very messy code but just trying to get some functionality out of this) HTML: ```html <div class="comments-container">...
No description

Placing a background image behind nav bar...

Hello! I am a newbie with this stuff. I want to place a background image behind the navbar, instead of a background color. How can I achieve this? I also am required to use flexbox, if that adds any restraints on what I want. my professor is lacking in the instructional department! πŸ˜…
No description

install npm BeyondCSS

Hello, been following this course and have watched Kevin's video to install npm https://module-1.beyondcss.dev/lessons/practice-project-pricing-table Got an error File exists: /.npm/_cacache/content-v2/sha512/eb/a7 ...

Javascript Intervals

Hello im trying to make a simple game where user chose a tool then use it and get items from that, but when i try to add intervals for mining im getting small issue. When i use tool with some id it works great but when i try to use that tool again (with same id) interval goes faster here is the code:...

Grid area and negative numbers

https://codepen.io/fluffybacon-steam/pen/ https://codepen.io/fluffybacon-steam/pen/PoVVWMO (ended up destroying the last pen, here is a new one) I am trying to span a green line (#greenline) across the entirety of the grid-area using grid-area:1/1/-1/-1; This does not work as intended and the line ends up sitting in the first row and column. Only when I implicitly declare the end row and column, grid-area:1/1/5/3, does the green line behave as expected. Why is this happening?...
No description

Text overflowing, need it to be scrollable

My side navigation items are overflowing and is coming below the 2 buttons. How do I make it go up and become scrollable?
No description

Parallax Effect

I need help on a React project am currently working on, I want to implement a parallax effect on a particular section am working on and I don't seem to know how and I need your help, please. The effect I want to implement is for the footer, how do I stick it to the bottom and unveil it with the previous section