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

add an element in the DOM

I realise this page on html ```html <html lang="en"> <head>...
No description

image floating and over crossing the boundary

Hello, I'm just asking, if how is it possible to do this with websites, the details that I sent in the image, btw, this is just a self project and credits to the owner of the design. How can I achieve this, using position absolute? or is there something I will do in the code to achieve this kind of details similar to the image I sent. like he is crossing the boundaries of the parent, like if I have a first and second section, how can I get him in the middle idk if my saying is correct sorry for my bad english. Thank you!...
No description

Issues With Sass -container Querie - Mixin

Good morning, if anyone can help me, I want to work with container queries and mixin but they don't recognize me (@container tablet......). What can I do What I'm doing wrong? Thank you in advance...
No description

Error in js

Hi everyone I realise this...
No description

Overflowing issues ( Height related )

Hey there! I am having this issue where my content inside the div is overflowing, I am totally unsure and clueless why is this happening. Here this is the screen recording of actual site, and what is happening, I have this div inside of main tag, and dummy text to illustrate whats happening, blue background is to show the real overflowing problem, Thanks...

Automatic scroll is not working for certain pixels 320px to 1023px.

Hi everyone, I will not be able to share the code and screenshots for my issue as we have client restrictions. Help me, if you ever faced this issue. Problem: We have a implementation on our web app that on click of a button the screen automatically scrolls to the top of the page, but this scrolling behavior is not happening for the screen between 320px to 1023px. For other resolutions its working fine. The code we are using to automatic scroll is `` document.querySelector(#forms-section`)?.scroll({...

How do I align this to the right side of the screen

I created a button in CSS and I've tried aligning it to the right side of the screen with no luck

Aren't custom properties inherited?

Just had to set --_custom-property:inherit; what's up with that?

How to handle overflow in Grid (grand-)children?

Hi, im currently working on a grid layout where the grid-items are either flex or grid themself. The issue i have though, is that there is overflowing text which doesn't get recognized by the browser as overflow. So overflow: hidden; doesn't have any effect. I implemented a small prototype with which i can show the issue here: https://play.tailwindcss.com/S1d0f4JYmk When you toggle to mobile size, the text of the two smaller grid-items overflows behind the img in its container....

How to learn Creative frontend development ?

Hi I want to learn creative web development and want to learn animations, svg, canvas and 3d effects. I want some resources to learn these topics. Can you provide me best resources from where I can learn these ?

Having trouble implementing the exit functionality on various mobile devices using framer Motion.

I have used AnimatePresence and set the time interval for the animation. Everything is working fine on the desktop, but on mobile, I have tested it on seven devices, and in three devices the animation is working properly, while in the other four, it is not. The issue is that the animation takes extra space during the transition, causing the height to increase. I need someone to review my code and fix any errors causing this issue. The animation should work properly on mobile, without taking any...

How to don't close ModalContainer if "areYouSureModal" isOpen?

```ts // If you know how to do it in better way - do it const { isLoading } = useLoading() const isAreYouSureModalOpen = useAreYouSureModalsStore.getState().isAreYouSureModalOpen ...

Sticky header dynamic color per section

Hello guys, I have one interesting problem which I am not yet sure how to solve. On a website I am working on, I have two primary colors (dark green and light blue). I want the color of the text in my sticky header to switch between these two primary colors based on the background (If I can set which color to use on which section it would be awesome). I was playing with the mix-blend-mode property but it doesn't really suit my needs since I cannot say which two colors to use. There is also one criteria that when the sticky header is on the border of two sections (one light, one dark) the header text have two colors (the upper part of text according to the upper section and the bottom part of the text according to the color of the bottom section)....
No description

does anyone here can help?

can anyone here can help me point out what better to use for this effect?

position:sticky; doesn't work

Well... it does. If i define the height for the parent element (.container), the sticky element works flawless. But the height is supposed to be defined based off the height of the child element in the middle. There's 3 of them and 2 are supposed to be sticky. Check my comment for .container https://codepen.io/Hej-123/pen/bGZVMjx ...
No description

is it safe to use 50% there?

hey, im working on tiny recreation of a figma design and i came across this. i know that the best thing i could do is using subgrid, but sadly to this date, subgrid isn't fully supported yet. im thinking of splitting this using flex basis 50%, basically header has colspan of 2 and inside the header, there would be 2 navs, one on the right and one on the left, is it ok to do it like so? the layout itself is easy but im not entirely sure if this is the right thing to do.. and yes, that image has rowspan of 2....
No description

Dynamic max-height

I wish to make the list height transition but only up to a certain height Markup: ```html <section class="insights-watch-time"> <div class="insights-watch-time__header">...

width of container for creating an 8.5 x 11 form

We have a form in excel that I need to display in a web app. The data entry will be done in multiple input dialogs. The results are displayed dynamically on the form to be exported as a pdf. I am laying out the form in css grid. I have 19 columns. I originally set my font size to 16px and I am using rem as my units. I set the width to 720 but the col7ms are quite narrow. I tried changing the font size to 14. I just wondered if there were some standards when setting up a form in css that...

Intrinsic clamp formulation problems

Because I've managed to make my logo/title bar intrinsically responsive in a non-standard way, the very simple problem of getting that logo to float left (or the main content to float right) is proving tricky. If I fixed instead of sticky the logo, I get a weird margin/padding protrusion. Actually using float messes up my logo/title . So I am trying to force the issue by setting the margin-top of my main to 0, but only on large screens, on small ones it should be left alone. My clamp math shenanigans which are working elsewhere is not working in this one instance. This seems to be always zero: ```main { margin-top: clamp(calc(9.5em + 1lh) *-1), (40em - 100vw) * 1000, 0);...
top-margin of main is zero