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

CSS radio button

hello guys plz i need help with this ,how can i do it with the best solution

CSS solution for this

Hey guys, to get the notch in middle I've used two divs with border radius. But now because of that text inside one div wont expand. I can I use css so that the blockquote expands all the the way across ?? CSS:...

.box:hover:after fade in transition

I'm trying to animate a fade-in transition for a .box:hover:after property, and am not having much luck. Codepen; https://codepen.io/rainbow_blacklight/pen/qBMQXXB Would I need to make use of the animation property to achieve this?...

Fit image inside div whilst maintaining aspect ratio and border radius

I know most people here are HTML/CSS purists but I don’t think this leans too heavily on other toolsets for some relevance to here. Would anyone be able to help with this StackOverflow question? https://stackoverflow.com/questions/75816452/fit-next-image-component-inside-div-whilst-maintaining-aspect-ratio-and-border-r

How can I make my navbar responsive with 8 links?

I've made responsive navbars before, but only with 3 or 4 links. I'm developing a digital portfolio, but the navbar has 8 links in it. This Jsfiddle will show what I have: https://jsfiddle.net/7nwg6v5k/7/. I'll make it so that when the screen gets too narrow it transitions to a hidden menu. On full-size screens my current nav works well, but even at slightly smaller screens the text wraps and some links overflow. I'm not sure of a good way to make this work. I don't want it to change to a menu before screen with gets below one third of full size. Sorry if I've not worded this well. Anyone have any ideas? Thanks...

vite can't find sass variables

Hey guys, hope you're doing well. Today I faced with the problem, idk why it's happening, but here's the problem: - I made a file, called _variables.scss - put some custom variables there - import that file to my global.scss - import global file in my main.tsx...

Position sticky doing werid jumps on mobile

Hi there. So I have a button that is sticky on mobile. It should only show when the user scrolls past a certain element. However it's acting up quite bad, and moving all over the place. Any idea what could be causing this? I tried using both top and bottom as the position. The button is always sticky, the class "in-view" that gets applied via javascript changes the opacity. Pased an image of the element in question...

[solved] Img behave different in Chome?

I have an issue with images: They are above each other and I make one visible when hovering, this works just fine in any browser but Chrome. In chrome for some reason they height is different. They are the same size so that cant be it. ...

How does this example from React documentation work?

Hello guys, I'm reading the new React documentation but I don't understand a little thing. In the step 5 in this page https://react.dev/learn/reacting-to-input-with-state the handleSubmit function updates the status state 2 times (one at the top level and one inside try/catch). How is that possible? Shouldn't state be updated with just the last value? I tried to add a new counter state and increment it by 1 every time that setStatus is called, and it actually gets incremented only by one per submit, as I expected... so why is setStatus different?...

Working VS Code extension for Custom Property intellisense

Hello! So I've been trying about 3 or 4 different extensions to get intellisense going for custom properties coming from an external file, when working with multiple .scss partials, but apparently, I'm not setting those correctly or they just don't work. You guys have a working setup that has been working for you ? What settings were tweaked to get there ? ...

Force Grid Box to align at top

New to Discord so please forgive me if this post is not as it should be. I'm having an issue with content alignment within a grid box. The first image illustrates my desired result of a page using a grid. The Menu, Heading, and Footer are not part of the grid structure. I have 10+ pages that use this same structure. The attached text file is a mixin I use to include the grid structure. The four parts of the grid can all be of variable height. The problem is related to the height of the page_Table area. The area is populated with a dataTable from my database. Because the table length is greater than the height of the image everything looks fine (2nd image, i.e., table aligned to the top of the grid area). But, if one of the alpha letters is selected, which has fewer rows than the base table (3rd image) the table appears in the middle of the grid area....

border-image problem (solved)

I'm using border-image to add a linear gradient border to the bottom of an image. However, the top corners of the image are also showing the border, even though I only want it to appear on the bottom. Here's an image that illustrates the problem: !...

Custom hr in CSS

Is it possible to achieve something like this with css ? I dont even know how to start with this.

Need help with some layout formatting... CSS.

Hello! I have a large ellipse I am using for some layout design. It is larger than the page size and overflows off the top of the page no problem but then the bottom of the page extends to scroll down to the bottom of that image... Here is a screenshot from Figma of what I want it to do:...

Using default values from a JSON file

I have this issue on the live version: https://cozynova.online/mvptimer/ I would like to use the default values from a JSON file if the user inputs nothing, at the moment I assume values of true/false, but I feel like I'm not doing it correctly. ...

Preventing Flexbox 'runts' with CSS

So on our website, we often have relatively long menus where flex-box is the ideal way to arrange a number of options. The only problem arises when the last item is all alone and it looks weird and unbalanced. We have avoided this in the past basically using 'magic numbers' as it were, but I'm working on a more general solution. Here's my codepen: https://codepen.io/crowjake/pen/vYzzQxY My solution is OK so far (custom properties and nth-of-type stuff), but is pretty restrictive and will require media/container queries to be made responsive, which somewhat defeats the point of flexbox....

Scroll-margin-top: Why overflow hidden has an impact

So I've worked out that removing overflow: hidden fixes the problem on at least one of my sections that were ignoring the scroll-margin-top property On at least one other it has no impact. I was just wondering if anyone had any ideas why that might be? Does it scroll to the contained elements that have overflowed and aren't visible?...

How to design a page from jpg design file?

Hey. I am trying some frontend mentor challanges, but it comes with just a .jpg file showing how it should look. Whats your best app to detect pixel sizes or to make it work like in cssbattles where you can drag a line showing what to change? (I am using Windows 10 if that matters)

`CSS.supports` not working for `transition-property: grid-template-rows`

I'm trying to implement a Collapse/Expander element using CSS Grid by animating grid-template-rows. However, I need to know if it's supported first, but it seems like CSS.supports always returns true for transition and transition-property. e.g. ```js CSS.supports('transition: grid-template-rows') // true CSS.supports('transition: grid-template-rowssss') // also true CSS.supports('transition-property', 'grid-template-rowssss') // also true...

javascript function not executing

please, can anyone help check this code snippets linked below? i have two functions in particular not executing:
1. displayCurTime()
1. displayCurTime()
2. displayMin()
2. displayMin()
...