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

Weird space below my page

Hi everyone! For some reason, I have a weird empty space below my page, and I can't figure out where is it coming from. It's definitely not some rogue margin or padding. Even the whole html component won't stretch all the way to the bottom. How can I fix it? I use React with TailwindCSS. Here is a screenshot of how it looks like. I want to toggle between dark and light mode, and this white stripe remains white no matter what I do. It goes away if I just change the color on <body>, but I don't think it's possible in React....

How to make a slider like on this site

Who can throw off or suggest how to make such a slider as the one on the link, otherwise I'm a beginner, I still don't understand well https://fancyapps.com/docs/ui/fancybox/...

Border not taking Radius

How can I make it look like the attached design? ```html <tr bgcolor="#f5f5f5"><td align="center"><table align="center" border="0" cellspacing="0" cellpadding="0" role="presentation"><tr> <td class="cta" align="center" style="border-radius:45px; border:5px solid #000002; background:#d62828; padding:15px 75px; font-family:'Roboto',Helvetica,Arial,sans-serif; font-size:16px; line-height:24px; color:#ffffff; font-weight:700; "> <a href="https://www.google.com" target="_blank" style="color:#ffffff; text-decoration:none; display:block; ">...

Clicking on one element sets it a class, while removing classes from other elements, dynamically.

This, I'm guessing, simple problem is giving me a headache for 3rd straight project in a row. If I for example have 6 buttons of the same class, and I click on any of them, that one gets class of "active". However, if I click on different button, any other button that has that "active" class should lose it. Or simplified, one 1 button can be "active" at the time. ...

how to highlight menu on submenu clicked

Hi all, i have a <p> tag which is the menu and <li>s as submenus. How i can target via Javascript the upper <p> element when li is clicked? ```<ul class="sub-menu " id="products"> <p class="submenu_header"> <i class="fa fa-book fa-lg"></i> 1st Year...

Seeking help regarding tricky image gallery layout

Hello everyone. I'm working on a project where a designer gave me a very specific image gallery for which I don't find any suitable CSS solutions. I thought about many ways of solving it but I don't find a respectable solution. So my hope is this nice community, for which I reach out with the mentioned problem. The image gallery is a two column somehow masonry design, which always has the 2/3 proportions. It will contain images with different proportions and will sometimes also have quotes embedded (which will take up more space then the image in this column.)....

need a little bit of code review

hey folks this is my jsx ```jsx <Box className={styles.container}> <Box sx={{display: 'grid', placeItems: 'center', height: '100vh'}}> <Box sx={{border: 'solid black', borderRadius: '2rem', padding: '2rem', boxShadow: '0 1rem black', background: 'white'}}>...

Side Navigation or Menu creation

Hi guys, i want to know how i can do like this side menu? if anyone have any clue, idea or code for this kind of side menu please share it, Many thanks❤️...

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....