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

Challenge 1 Question

@kevinpowell // Day one challenge 1. Limit the total width of the “intro-content” to “about half” of its “PARENT”. ...

Fixing margin(?) issue

Hey! so in image, you'll notice that the first Select (with the text "All" is more to the right due to the others having an X, which the first one doesn't need I already attempted with an "::after" it didn't help I already tried putting a margin-left as well as padding-left on the X, it didn't help...
No description

most efficient layout option

Hey, i'm wondering the most efficient way to layout the size of the image in this design on both screen sizes. - on the mobile version, the image height is smaller than the height of the content below so would ya'll recommend something like a grid-template-rows: .6fr 1fr; / grid-template-rows: 1fr 2fr; or not using grid or flexbox and just setting a min-height on the div containing it? But then i was thinking since it get's placed into a grid on desktop that the grid option would be better? But ultimately i'm not sure on the most beneficial approach for this sort of layout. - on the desktop version, it's kind of the same question, would you recommend something like a grid-template-rows or height based solution for the ratio between the larger image and group of smaller ones underneath?...
No description

CSS `image-rendering: pixelated;` works not as described in ~~docs~~

W3 states that using pixelated value of CSS image-rendering property has effect only if image is upscaled. However, this is apparently not the case in Chromium and it does not work in Firefox too.
If the image is scaled down, it will be the same as auto — https://www.w3schools.com/cssref/css3_pr_image-rendering.php
...
No description

Background image position

I have a background image whose size is larger than container i want to fit the background image in the container so that the image shoud not be stretched or cut . I am trying to use background position by giving values in percentage but that is not helping what should i do

image wrapper

hey, i have a design of a hero section that i am trying to re-create. In the design on mobile view of the image doesn't get affected by the wrapper (it touches the edges of the page) but on desktop view it does (it get's centered along with the other content). I've currently got it set up where the image is affected by the wrapper on all views but i can't figure out how to make it get pushed out to the edge on mobile, I've tried just applying the wrapper class on the column with the text which m...

semicolon or no semicolon for javascript

So I've been doing some research on my own and now dabling/learning JS. One of the things I notice is this whole semicolon vs no semicolon. From what I'm seeing almost all other language use semicolon so my question here is. Do you need to use semicolon or can you create an entire application without a semicolon. Whats the correct way to write JS code or i should say whats the job ready habit I should take on from now when it comes to writing JS...

Can I hire a CSS guru to make a grid that respects vertical bounds?

I have built and rebuilt a css grid for a very specific purpose, however all my attempts don't satisfy all requirements and customers are nearing riot levels of disdain. I need to come up with something that actually works as expected. Requirements: - Grid items resize to fill all available container area (vertical and horizontal) without overflow. - Grid container does not shrink below 600px wide....

HTML & CSS help

I am needing help, I am trying to create a special effect in HTML and CSS. Can anyone help me?
No description

Help with scrolling submenu, IntersectionObserver

I'm rewriting some old code we had that used window.onScroll to set the active state of the current sub-section of the page. I'm trying to use IntersectionObserver, but with short sections, it's observing two active sections at once. Essentially I'm looking to mimic the behavior of the side nav on Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event - it only marks a section as active when it's on the top close to the sticky menu. Anybody have any good resources or code...

Tips on how to deal with the mascot possibly blocking the search or content below it?

Feel free to criticize and tell me what you think, I'll appreciate it. I'm looking for ideas on how to deal with the mascot. I was going to add a scroll event listener to the window and make the hero overflow: hidden; to hide it when the user starts going through the page, but that doesn't fix the search bar issue. What would you do in my situation? Do you have a cooler approach to this? Thanks for checking my post!...
No description

lightgallery.js implimentation

trying to implement a lightbox using lightgallery.js my html looks like this ```html <section id="animated-thumbnails-gallery">...

Optimal Approach for Displaying Different Content on Mobile and Desktop Screens

I am working with React.js and Tailwind CSS. I have two divs with multiple pictures each. I want to display one on the mobile screen and the other on the desktop and tablet screen. * What would be the preferred way to do that? * Although the first method looks preferable, wouldn't it load the images unnecessarily in both divs if they are needed in only one div at a time? * Method 1:...

White space - no wrap issue

Mat table , table cell content gets hidden Am trying to display a list of countries in a cell . Initially , I show 2 countries and on clicking 'View All' , will display rest of them . When I display rest of them , onlt the countries fit in cell are getting displayed . I want the table cell height to unjust accrding to the content of the cell . HTML :...

Image Optimization

What is the best way to optimize an image to boost a page load time?

SVG not displaying

I have a function that returns an SVG element like so: `` const svg = document.createElement(svg) svg.className = logoField svg.setAttributeNS(http://www.w3.org/2000/svg`, viewBox, 0 0 95.65 48)...

Image height

I'm probably being really stupid about this, but I have the following problem (see attached image) It's just a simple image with object-fit: contain on it, but for whatever reason it keeps adding an insane amount of white space to the top and bottom. The amount of white space varies on each different image. All I want it to do is stretch to fit the container, and take whatever height it needs to....
No description