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

i got problem about background-image

i created div and gave class of background-image then i wrote it background-image: url("./pictures/background.png"); but image is not showing up but it works on body

need to give gap between the elements in div

hey folks when the
display: flex;
display: flex;
we use the gap property to give gap between the elements in that div but what if ...

How can I fix my SASS List?

```sass $rainbow: #dc3545, #fd7e14, #ffc107, #198754, #0d6efd, #6610f2, #8F00FF @each $color in $rainbow .#{$color} background-color: #{$color}...

Tailwind config file embed

is there a way to embed a config file into an html document so i can include the tailwind config file within an html doc similar to how you can embed JS and css? I looked at Tailwinds docs and didn't see anything, and additionally, I looked ad MDN Docs at embedding different file types but I'm not sure if config files behave differently, and I didn't see anything specific or similar in nature. Maybe I can embed it in a JS script tag?

difference between these two media query

hey folks what's the difference between these two
@media (max-width: 600px) {
}
@media (max-width: 600px) {
}
and ...

Odd anchor behavior

Does anyone have an idea on why this might be happening? By clicking on: "4th section" (yeah, I know it's badly placed), it jumps weirdly, then if you scroll up, it's cut-off, and if you scroll down, the background image moved. https://cozynova.online/windcutter/#New-Player...

layout shifting with grid template columns

Hello guys! I'm working on a project on react and got confused today, how the child of grid container can inherit it's display value and works at the same time with flex? This section has a pretty simple layout, one container and several child components. If I set grid template columns property to 1fr it's breaks as on the screen, but if I change it to 100% it works and start containing everything to 100% of the container width. How is it working like this? PS if I uncheck display grid property from bottom box, it's start working as well...

OffsetWidth returing an incorrect width?

Anyone got any idea why this might be returning a value that's 10 pixels out? The .slider-container has a width of 447 in devtools, but in my JS it's returning 457 This is basically my JS solution to my previous slider question, but those 10 pixels are annoying! https://codepen.io/nwoodward/pen/yLEZddp?editors=1111...

How to have an element sized relative to its grandparent *and* be able to move it?

Hello! So I'm trying to create an image slider that has 'x' number of visible slides on the screen (see the attached image). The slider itself is then moved across the screen. The html structure goes like this:...

flex-grow - Maintain aspect ratio

Suppose i have the following: ```css .parent { display: flex; flex-wrap: wrap;...

Problems using Parcel

All of a sudden I'm getting a lot of errors trying to run a parcel project that was fine before. I switched all the files to a new laptop and I'm not sure if I ran npm run dev on the new laptop or not. I 'm getting errors for js modules, sass files, and the following: ```bash Server running at http://localhost:1234 🚨 No entries found....

Responsive navbar bug

When i switch to the mobile view, the navbar opens and closes quickly and i only want it to open when you click on the hamburger menu. Also the height changes when switch to mobile view. What can I do to avoid these 2 issues?

issue with using % units while using them to set the height and with

Hey folks I'm having some issue while using the % units to the height and width of my div etc. This is the CSS of the parent container ```css .container { display: flex;...

forEach loop

I want to check if the classList contains 'active' and add class to a container, so here i want to break the loop if the 1st element contains the class, and not loop through all the element

do clamps work on image width?

i tried using this on 2 images but it does not seem to ever reach a minimum width anyone has a clue on how clamp works when mixed with image sizes? width: clamp(0.5rem, 2vw +1rem ,5rem);...

Transform scale to increase size of image causing overflow

Hello. I'm using transform scale property to increase the size of an image but that is making an x overflow. If I write overflow-x: hidden that doesn't fix the overflow. The image isn't overflowing from the page, rather it's the parent div that is overflowing. Only happening on mobile device

Tooltip with CSS with overflow hidden

From the section portrayed here: https://cozynova.online/hackandslasher/#Farming-Equipment Is there any way for the CSS tooltip to being able to stay on top, while the parent has overflow-y: auto (so I could scroll through). This is the relevant code of the tooltip:...

Grid autofilling slots

Is there any way for the grid to fill in the empty slots? https://gyazo.com/4228dd1f37765c2005faca892f8ae6ea As simple as the demo shows. I was wondering....

Best way to organize multiple menus

In a web that I'm redesigning, I have 3 UL menus (user menu, language menu and main menu) in the head. What is a best practice from an accessibility point of view?: -Have 1 NAV with 3 ARIA-labeled ULs...