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

https://codepen.io/Redcaus12345/pen/wBwLqxm

Hi, I'm working on a slideshow using JavaScript that should also work on iPads and Phones, but I'm having trouble with the mobile display. Do you know how I can code it to function properly on these devices? Any tips would be appreciated!

Center a div

This is my solution for challenge number 1. My question is that when I set the style
margin: 0 auto;
margin: 0 auto;
the parent div is automatically centered horizontally . If I do the following it centered horizontally too:...
No description

CSS grid that's constrained vertically

Finding it pretty difficult to recreate this pattern tbh Each image needs a fixed aspect ratio (easy enough), but as the grid grows the content should be constrained by the grid height and overflow/grow horizontally if it needs to. Problem I've currently got is how the horizontal space is distributed between columns rn (2nd image)...
No description

js question

i am making to do app, and i cant figure out how to check if "goal" is confirmed. https://codepen.io/etrbbr/pen/LEPoMQZ i have one idea but i am not sure that is correct....

Best/Common Page width

There seems to be a million different suggestions for the best/most common page (content) width, what's yours? Regards Pete...

3D Perspective Strategy

Hi, I am having trouble understanding how 3d perspective is intended to work. The attempted css effect seems dependent on the screen size. The wider the screen the more intense the css results. Codepen: https://codepen.io/kevinmclane/pen/xbKNGXP Is there a correct dynamic approach or do I need to incorporate media queries?...

css questions

I’m a little bit confused about background images. Do I really need to use them as background-image, or can I just use an <img> tag and set position: relative? Also, I don’t like how background-image behaves when I resize the screen. ...
No description

Image masked with image wrapper in Grid..

👋 Hi All, I’ve been struggling with what I though would be a simple layout.. I am hoping to create a 2 column grid with an image that fills two columns and an image wrapper that uses “overflow: hidden; to reveal the image in just a single column.....
No description

Javascript logic help pls

https://codepen.io/saad-shehzad-the-bashful/pen/raBbdXg I don’t know how to come up with the logic or planning for this design. It’s a really common FEM project, and it’s really basic. However, I’m having trouble because when I click one button, I want the background-color: white; to apply only to that button. When I click another button, the white background should be removed from the previous button and applied only to the newly selected button. Then, when I click the submit button, it should redirect to another HTML file that says, You pressed 'the pressed button' out of five....

How to make a button seem more like a button?

I have a navbar with a hamburger here: https://thinking-boats.pages.dev/playground/ From the feedback that I have got from non-devs, the initial "close" svg doesnt seem like a button. How do I fix that? The first idea was a sort of clipping circle in the svg? Not sure how to add that.....

need help to implement it

https://codepen.io/etrbbr/pen/VYZNyxM The question is how to make it look like in the picture, where there is a large gray background section in the header, and this section overlaps part of the cards. How can this be done?...
No description

Resize block after text wrap

I want to create pricing list like on image. I use flex container on each line, inside are two text blocks and hr between them. ```css .option { display: flex;...
No description

TypeScript type error

Hi guys! I have a type error where I'm at a loss on how to proceed. I'm writing a discord bot that fetches messages in a channel, filters them, and then transforms the data for my backend models. Please see an example of the filter function:...

How to replicate Grid-like UI with border color?

I recently noticed a trend of this kind of UI and want to replicate it in my next project. I have tried inspecting and messing with some css but can't properly understand the implementation. Can someone please guide me to any article, blog post or tutorial that implements this type of UI? Thanks in advance https://www.better-auth.com/...

i am running into a problem with removing and showing divs

https://codepen.io/etrbbr/pen/raBRbQM When I simply create two divs and toggle the hide and visible classes, everything works fine. But in my code, for some reason, it doesn't work. On the first click, it adds the classes, on the second click, it switches to the second slide, and after that, nothing happens when I click again. What am I doing wrong?...

Make overflow without absolute max-width

I want to make container with horizontal scroll and use flexbox for it: ```css .grid { display: flex; gap: 0.5rem;...
No description