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

Adding Centered Title on this section

Hi Guys, newbie question - Under this Shopify section - I can't seem to add title heading using css. I tried few different codes but it seems that the section is not accepting the code. Any insights? Thanks.
No description

for, for of, for in loops

after finally starting to understand loops and how they work i havea curios question. Lets say we have an object like the one listed below and we need to loop over this object(obviously these will be more complex in a real life situation). ```let cars = { carName: 'Sorento',...

border image or clip path?

this is what i want to achieve:
No description

Need solution on this sass code.

Hi, I create this function for root $colors_variables: ( input_radio_border_color: #fff,...

Vertically centering a number

I'm trying to center the numbers in these labels, but struggling to figure out how to deal with the little extra space on the bottom of the glyph (if that is the right term?). I'm guessing I'm over complicating this... any tips on how to get the number in the center of the circle? I've tried putting flex on the label and tinkering around with "vertical-align" on both the label and its parent. ```html...
No description

Part of page without container

I'm doing challenge from fem: https://www.frontendmentor.io/challenges/equalizer-landing-page-7VJ4gp3DE?ref=challenge-roadmap and thinking about layout of page. One tricky part is that one section on mobile is touching sides of screen. For tablet and desktop whole page have padding. My approach is to wrap whole in container but I'm not sure how to solve this mobile tricky part. ...
No description

cssbattle challenge

how can we create this: https://cssbattle.dev/play/160 my brain stopped working....

Stacking/z-index issue

Hey, i'm having a little trouble getting my z-index stacking to work correctly. In this design i'm trying to recreate i'm given two separate images, a background image and a main image. The way I've chosen to approach this has stopped interactivity with my cta as i put a negative z-index on my hero section to match the design as best i could which i have figured out is the source of the issue. I'm just not too sure on the best way to approach the stacking layout for it as this issue has proven my method isn't efficient nor effective 😅. Here's an image of the design i'm trying to replicate and my codepen if that helps 😄 (i've taken out all of the code not relevant to the problem so some things may look a little out of place or inconsistent in the css as i've only included what is used within my navbar and hero section to avoid confusion for ya'll. This currently only works on mobile view). I'd really appreciate anyone's help whether that be suggesting a new method or tweaking the current one! Many thanks in advance! https://codepen.io/deerCabin/pen/GRPZLBy...
No description

How do I get all my border radius' the same size?

Hey guys, I'm working on a calculator project- I can't seem to get all my border radius's the same size when it comes to the CSS. Attached is the codepen- can anyone find out how to fix this? I'm trying to apply it to the whole g1 class so they're all the same- but it doesn't seem to work- some look bigger than others: https://codepen.io/spencerrcr/pen/gOZryxX

IntersectionObserver for multiple targets

Basically I want to have a fixed button for a quick navigate at top of the page but I don't want to display the button for first few top elements. I have this code pen with an example of what I tried but it works partially. Sometimes the Up button disappear even if I am scrolling in the divs where I want to display the button. https://codepen.io/Andreica289/pen/qBLZvRg I appreciate each insight on this or any other approach to create a fixed button after a certain amount of page has been scrolled....

OpenGraph issue in ReactJS

I have a website which is similar to a social media Site. I want to create openGraph helmets for each user. This data will be generated dynamically. I have tried, to do it using react-helmet-async library, without much luck so far. Any suggestions?

"without touching the module, implement it so that the user can interact with it"... I'm stumped.

I've built an inventory management app in the console, but it didn't use a module, so it's made it very confusing for me. Posting some of the code as it's too long. ```js...

Suitable styling

Hey, i have a question about inline styles. I know for the most part they are bad practice however in a project i'm building the majority of my styles for elements are utility classes with one being a flow class which adds spacing between sections. This is defined as: ```css .flow > *:not(:last-child) {...

Trying to bring two items closer together inside a grid on different rows

https://codepen.io/bsups/pen/yLGOZBL At the bottom trying to bring the name Michelle Appleton and the date closer together. Im pretty sure I had it working last night, but decided to redo it because I wanted the button to be more dynamic rather than replace by new html. (I despise this Frontend Mentor layout) I have tried all the justifies and align options, the elements height, and messing with margin....

Site Rendered Oddly on Chrome Mobile

I'm wondering how to fix the issue of Chrome Mobile not displaying a div containing a select tag normally. It works properly on all other devices around my house! I'm using Chrome on an iPhone 8 (yup its old) and it makes the div containing the select tag rounded with a gray background and wider (which messes up the layout too) than on other browsers! (For example when I use Safari it renders normally) If you're up for solving this mystery and you have an iPhone, the URL is: https://tms57.github.io/apps/FractionCalculator/index.html I looked into a way to get into dev tools using Windows connected to my iPhone but that looked like a very deep rabbit hole! ...

I can't get rid of 12 extra pixels below an image and it's not vspace, margin, or a whitespace node

I have this very tricky grid which has to fill the screen without scroll bars and flow in a certain order every time without supporting a more friendly phone view. It works in this design to fulfill requirements, except for one thing, which is each image container ".gallery-thumb" is about 12 pixels too tall and I can't figure out why. I've tried the following things: removing the whitespace nodes collapsing the borders, margins, and padding setting vspace to 0...

How create transition for height?

I have ul and li elements and I can have 4-5 li elemans and can have 9-10 li elements I want change hieght of div to fit ul content Now height property changes without transition I tried smth like...

Hover with Border-color showing and Image opacity in 0.3

Hello, please how can I achieve this in CSS: I am trying to hover on the image with the Border-color showing with no opacity, but the image retains its opacity of 0.3. Problem: when I hover on the Image, the Image and the Border-color is affected by the 0.3 opacity....
No description

Section

I have always learned that the html element section needs a aria-labelledby to be semantic, and without it, it becomes just like a normal "div" Do you still need the "aria-labelledby" to make a section semantic? ```HTML <section aria-labelledby="test"> <h1 id="test"></h1>...

Dynamically setting the color in TailwindCSS.

I am working with Next.js and Tailwind CSS and using Context API to set the theme of my webpage dynamically. I have a color palette of 8 colors. But hover:${themeColor.bg.base} is not working with hover, otherwise the color is working fine. themeColor.hover.base actually points to bg-themeColor2Base, and themeColor2Base is defined in tailwind.config.css....