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

Bottom Triangle effect

I want to make this similar effect in CSS. Is there a good resource on how to make an effect like this? I do see it using flexbox. https://georgian.edu/academics/undergraduate-programs/computer-information-systems/...
No description

This works on Desktop, but Mobile it's deform... please help

https://codepen.io/Auto-Ma/pen/KKLXGzQ The layout is fine until a certain small size screen where some require scroll to the right while other are narrow like a straw. It should have been simple enough, but I'm not great at this. ...

How to fix 100vh and grid-row 60px 1fr causing a scroll bar to show?

I have a grid setup on the body of my page and define two rows. Row A is fixed at 60px and row B is set to 1ft. I also ahve the body min-height set to 100VH. This combination causes a vertical scroll bar to apear. If I change 1fr to 0.99fr it goes way, like wise if I change 100vh to 99vh it goes away. This seems like the wrong way to fix this issue so what is the right way? Code pen example (note I do use normalize) https://codepen.io/Eaglef90/pen/qBGPMpJ...

top bar alert

Hi guys, I'm making an alert bar with the <marquee> tag but I don't want it to pass information, I want it to slide from one piece of information to the next, any tips? website im making : https://box46.criativatek.com/...
No description

box-sizing: border-box

What does box-sizing: border-box actually do? how is it different from the default box-sizing? And I noticed that when it is default box-sizing, any element with width: 100vw doesnt stretch full, that is it leaves some space at the left side, why is it so?
No description

How to store redux store to localstorage and get it when page refreshed

The issue where the page refresh causes an automatic logout typically occurs because the token is not being persisted across page reloads. in react redux How can i fix it?

Relative color from currentcolor

Hello everyone, On MDN's relative color page (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Relative_colors) it's stated that origin-color should be any valid color, including currentcolor. But when I try to do something like this :...
No description

Background image is not full height with dialog element

Hello, without using background-attachment: fixed, I would like the image on this page (https://wisio.io/test) to always fill the height of the viewport, especially on mobile view. Perhaps this is not possible, but any suggestions would be appreciated. Thanks....

grid container with flexible rows?

i'm not sure if this is the right title but here we go. so i wanted to have a grid container with 3 columns. these columns have the same width. my items in it has the height of a max-content, when rendered i wanted the items to be right under each other without the grid's row height but i cant find my way around it. is there a way to set the rows in a dynamic way? or am i in the wrong path? maybe 3 columns and those columns should have flexboxes in it ? i am very lost atp. i dont have much experience with grids and english is not my first language so sorry if i dont make sense here's my codes: ```css grid-container{ width: max-content;...
No description

Promises question

I have the following code: ```js function geocode(location) { geocoder = new google.maps.Geocoder();...

Real-time Chat Messages Not Appearing in Angular & Spring Boot Application

Hello everyone, I'm working on a chat application using Angular on the frontend and Spring Boot on the backend. The chat messages are not appearing in real-time for the recipient, even though the WebSocket connection seems to be established correctly. Here’s a summary of the setup and the issue: Problem Description...

please help me wrap my head around flex-basis (particularly flex-basis:0)

Ok so i understand flex-basis sets an initial starting point width for a flex item. In the case of flex-basis:0 though (or really any flex basis smaller than the min-content width) , doesn't this effectively just give flex items an initial width equal to their min-content width? (since they can't literally shrink lower than this). With this said, let's say i have 3 flex items with different intrinsic min-content widths, and I set them all to flex-basis:0 and flex-grow:1. How does this result in...

Match width sizing on flex containers?

I was wondering if anybody knew a neat way to grab the width of a flex-item container and apply it to a sibling flex container inside the same flex parent. I have a screenshot here showing a search component ("enter an address") and then below it a second component with a "browse" button. I was thinking there's got to be a simple way to make the browse button component as wide as the search input component. (Each component has the purple-gray background.) I am sure I could switch to grid or use a different flex solution, but I only want the browse component to match the width of the search input component, and for other siblings to flex the default way. CSS/SCSS for reference, the parent has: ```css align-items: center; display: flex;...
No description

<enhanced:img> in masonry layout

I am using <enhanced:img> and Svelte Bricks to create a masonry layout. The setup worked great with a standard <img> tag but had an atrocious Lighthouse score! Hence, I have switched to <enhanced:img>. Upon doing this, I switched my images from ./static/ to ./lib/ and also used Vite's import.meta.glob to correctly import the images. Once I did all this, with the code as below, I now get the RangeError: Invalid array length error when loading the images and I am unsure where it is coming from. The stack trace seems to suggest it is svelte-bricks so if that is the issue then I would be happy to switch to another lib. Here is a SvelteLab project But this is displaying different behaviours I think it is something to do with how SvelteLab works, but the same project gives the RangeError: Invalid array length error locally so make sure to run it locally!...

Giant White Space

Hello im new to this community. I need some help regarding this practice project as im rather new in web development and im learninh HTML and CSS. The problem im having is whever i add a new line of code to my html code, it keeps going down the more lines of code i add. When i move it to the right position using css, it just leaves a giant white space at the bottonm of the page. What can i do to fix this?
No description

vertical alignment for an element in the middle

Can anyone help me out to center vertically in the middle as i always fail to achieve this.(min-height is given in the requirement) https://codepen.io/kvandana451/pen/pomWzgK...

Button Hover switch effect

Hey! I wanted to ask what would be a way to achieve a hover effect when the buttons are hovered we the background and left border will look like switching from button to button; not just like fading in. It would be great help!
No description

Results summary component Frontend mentor

Hey, I decided to go back to basics in frontend web development so I did a level 1 Frontend mentor project. I would like feedback on the semantics of my HTML, the organisation of my CSS, and also my javascript if possible. Thank You (I couldn't put this on codepen because my javascript reads from a json file, and you need codepen pro to upload JSON files) So here's the link to:...

My div is bigger than the icon inside of it

I want the red div to have the same size as my icon, but for some reason it has this 'margin'. I already tried to use inline-flex, but it didn't solve, my div becomes the same size as my icon, but the space is still there. ...
No description