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

Having a button behave like a link inside a paragraph (wrapping text)

I've been trying to accomplish something for some time now, but can't figure out how to do it. I have a paragraph with some text in it. At one point, I want to add a button (which opens a modal). The problem is, I don't want the text to break to a new line. I want it to behave like a link. I've tried display: inline, different types of white-space, overflow-wrap and so on, but nothing works. I've even tried to compare the computed CSS between the button and an a tag, but can't seem to fi...

Image shrinks, icons don't

Hi guys! There's a problem with my navbar. I have a logo <img src="QuickCart.svg" alt="logo" /> and couple of FA icons in my unordered list. When I make the window width smaller, image shrinks down up until the point it's not visible anymore, while icons remain the same size. How can I make everything shrink? I mean, both the icons and the logo.Here's my JSX from Navbar component and couple of pictures: ```tsx <nav className="flex items-center py-4 px-12 relative shadow-md w-full">...

Wrapping text around image issue

I'm missing something here ... Why isn't the text wrapping around the image with shape-outside on these two images? https://codepen.io/amarlong/pen/jOppwwr...

how to create this "popup"

not sure if that's a popup, but how do i create something similar to that? you can see it more clearly here: https://www.harvard.edu/programs/?degree_levels=undergraduate just click on one of the programs below and it should appear...

Alter letter spacing to make text fill screen width

In the image attached (designed in Figma), my font has letter spacing set to -6%. I was wondering if there was a way to make text fill the screens width (and with an offset) with vanilla CSS depending on the screen size, or maybe using JavaScript.
[On a mobile device in portrait mode, the words would be on two lines but I understand how I could do that. The font in use is Inter]...

Colour selector idea

I was playing around trying to come up with a colour selector, when I thought of something (explained in the diagram below). Would it be possible to make such a thing? I can't think of how, though. The text needs to be simple html, but trying to do a theme switcheroo would mean slanted divs or something?

css flexbox gap

Hey everyone, is there a way to make the gap diminish to 0 while resizing a nav bar before the navbar overflows (assuming the nav bar items have a min-inline-size so they can't shrink)

React v5 to v6 update help with params update

Hello, dose anyone know a way to update v5 this.props.match.params.id into v6 which is import { useParams } from "react-router-dom"; but with out changing the class into a function? I tried to search for a way however I can't seem to find a solution for this. Here is one of my code that needs to be updated ```js componentDidMount() {...

Importing self hosted custom font in Tailwind

```css @tailwind base; @tailwind components; @tailwind utilities;...

my code doesn't work on live server

i'm seriously so confused, i can't review my javascript code through live server. it's frustrating cos when i deployed to vercel to test, some functions work and others don't in my javascript. i have no idea if this is a me problem or somn. is anyone kind enough to help review my codebase, please? github: https://github.com/winniffy/tip-calculator-app-main...

how to create similar layout?

hi all, i just wanted to ask how to create a layout similar to that? especially the picture part where it's "partially cut"....

Which is the best slider/gallery library?

Hi y'all! I'm looking for some advice regarding the best slider framework available. Whenever I need to implement a slider like a image gallery or even a content slider, I search the web regarding available options (like swiperjs.com, glidejs.com, splidejs.com, kenwheeler.github.io/slick/, keen-slider.io) and there are so many available that I'm kinda lost deciding and choosing. So I was wondering, which one is your favorite and why? Or do you even build your own?

Specific Google Font not rendering in React app

I have a specific google font, https://fonts.google.com/specimen/Nunito?preview.text=Hi!&preview.text_type=custom&query=nunito, that I want to use. I have used other Google fonts and they work fine. I have a few Sass files, a _fonts.scss partial that uses the @import rule for Google fonts. I have another file, Hero.scss that uses the font-family associated with the font. For whatever reason, Nunito does not render on either Firefox or Chrome. When I use a different font, like Fraunces, i...

Font-text Becomes Blurry in Responsive Mode

hello folks, i'm facing an issue that is when i try to make a website responsive the font text becomes blurry in responsive mode but works fine in desktop mode can anyone please provide me a solution ??

Is it possible to scale text to always fit the width of its container with container queries?

Is there a way (perhaps using container query units) to have text always fit the width of its container? Most of the solutions I've seen have been for static text, but what if you have, say, a blog title that could have any number of characters? Can we have the text always fit the parent?

How do I test webiste for android devices on windows desktop?

Like in the title. I am looking for a way to test my webiste for android and optionally ios. Responsiveness, layout itp. Do you know any solution for this?

Scroll animation

i want a certain animation to happen when i scroll upon the element. smthing like https://mycolor.space/ I posted before but no one replied....

Question About Responsive

Anyone know how to make responsive like this? Please Help Me 😭

onBlur event handler firing when focusing on child components

Hi everyone! I'm having trouble with my onFocus and onBlur events. I have this div, which is a container for search bar: ```js...

Horizontal scroll animation

https://codepen.io/ahad4387/pen/VwBBVNN I'm trying to achieve automatic horizontal scroll animation, what am i doing wrong here...