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

how to remove gap of text align end.

i'm trying to align text center and when i do with full width of that heading i see that text has some padding or margin to the end but all the elements that are related to h1 in hero section has margin and padding 0 but it has some gap and when i align text to start it doesn't have gap and when i align text to end or center it has a gap how can i solve it ? i'm working on this project after 5 to 6 days i think so i'm kind of lost already like where is what from html to css so i apologize for that....

Content going upwards and out of viewport when adding new things below

When i add new content below ,the existing upper content goes out of the viewport from the top. I am not suing absolute positioning , using flex-column in the main container ```html return ( ...

Creating an inverted border-radius with CSS

Hello guys, I can't realize the variables that Kevin created on YouTube: https://www.youtube.com/watch?v=khjVPkO35F0&t=312s We have access to the copenpen code, but there are variables inserted that represent the css properties which we don't know exactly what they are. Does anyone know? Thanks

Why does child element cause parent to overflow

I don't understand why setting overflow hidden on the page info section causes the section to properly fit within the bottoms section container. Without that, the long website link causes the content to overflow the container. I have a solution but I just want to know why it works and also if there's a different way to do this because this feels hacky idk? I was trying to think of a way to set the width of the section containing the title to fit within the container but couldn't come up with a solution. ```javascript <div className="">...
No description

Counter.js not working on live site (Vercel)

So I just deployed my newest project with Vercel and I'm using the Counter.js library, but I come to an issue, where if I'm viewing the project with Live Server (VS Code), it works, and the live site (Vercel) doesn't work. Here's the link to the source code - https://github.com/GeorgeDash/xurya (I left the node_modules visible on purpose, bc the issue might be from there) - and here's a video with the issue seen:...

i wanna know if i'm doing css responsive wrong

this number scares me a bit; like i only have like 7 breakpoints, from 1920 to 1280 so far, i'm not planning to do tablet i'll jump right through mobile [430 => 360] the whole css file will end up being 3000 ish lines ...
No description

Please review my responsive design layout

I recently completed building the responsive layout for the assignment from Kevin's Course Here's the github link: https://github.com/Samtheblackdragon/Responsive-Design-Layout-1.git And here's the webpage link: https://samtheblackdragon.github.io/Responsive-Design-Layout-1/ It has two media queries as suggested in the assignment which are at 700px and 1100px. Your input/review will help me improve ....

How to use Fetch API in JS

Hello guys, sorry to disturb you all; I have just learnt about the fetch API in JavaScript. I understand what it does in terms of asynchronous loading, like having new content displayed on a web page without having to reload the page but I don't really know how to use it, like the arguments it take, what we can do etc... Is there a small project that I can do just to make me more comfortable with that please. Also, while digging into the fetch API, I came across the term "axios"; is that a library that is more performant than the fetch API ?...

What is the difference between text node and textContent ?

Hello guys, sorry to disturb you all; I was just reading about some DOM APIs and came across text node; what is it? is it the same thing as textContent ?

Nesting media queries in non-media query

I see https://developer.mozilla.org/en-US/docs/Web/API/CSSNestedDeclarations#css does this, but "CSSNestedDeclarations" is only supported by less than 50% of browsers. (https://caniuse.com/mdn-api_cssnesteddeclarations) Is it ok to put a media query inside the declaration block of another regular selector? ```css nav {...

Facing Issues with @container query or container-type

I am trying to create a message bubble where i was testing out what if the message is one-liner so i've noticed that one of the pseudo elment was overflowing out of the div which is because of its absolute postion which is mandatory too, to have the rounded corners, however I wanted to fix it using @container query where i can see that it is not getting the auto height because of which query that i added is also failing. here's the codepen thought Thanks in advance friends!! codepen: https://codepen.io/raj-shukla/pen/zYgXqrY?editors=1100...

React reducer giving error

Although the value returned to me should be 8 categories, the returned value is undefined and returns 0. When called with an action of type "GetCategoriesSuccess", the slice reducer for key "categoryListReducer" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined. actionTypes.js...

Scrolling to an element on the same page - screen size issues

Hi all, I'm creating a navbar that scrolls to items on the same page, i.e. 'contact' will scroll to the #contact section, 'about' to #about etc. I haven't started yet but I remember this being messy, having to implement scroll-margin-top/similar js solutions when the snap was off slightly - this would get even messier when having to accommodate for different screensizes. ...

dl vs ul/ol

Hey, could somebody please explain the difference between a description list and general list and common use cases for a dl? Is the only difference that dl should be used for list items with a description? Thanks in advance....

User info across pages

I just want to ask an advice on how to consistently have the users info across pages, in my ways currently on each page/component I query on database to get some information, and just pass the idea of the user for querying, so maybe there could be another way

Cookies, Sessions and Tokens

Hello guys, sorry to disturb you all; I'm trying to make sense of those terms but they are not that clear. From what I have understand: - Cookies: Use to store some data like user preference (like dark/light mode) - data persist even though browser is closed because data is stored on local machine; this has an expiry date. - Session: Use to store data while the user is browsing; keep track of what user is doing such as logging in/shopping etc. (I'm still confused about that though, when we say keeping track of what user is doing, this seems vague)...

Using different resources to style pages #

For styling HTML/web pages, can we use different libraries/resources at the same time? For example, we may like to use navbar from bootstrap and use tailwind CSS to style other components and at the same time use pure CSS for other components on the same page. Will this be possible or will it create conflicts?

CSS – building a cohesive spacing economy in website projects

This is a principle and etiquette question. -# kind of like the mobile-first topic A thing that bugs me with every project is setting ground stones for default CSS properties that come with HTML elements. Do I eliminate all vertical spacing, do I only remove e.g. margin-bottom, on which elements do I remove them, how do I deal with first- and/or last-child ~...

inset behaviour

Hey, I have a position: fixed; header and a .wrapper class for this example. I wanted to center the header on the page with the inset property (top, bottom, left, right works too). However when i use inset: 1em auto 0 auto; which i assume to have the top, bottom, left and right order, it doesn't work, instead i have to do inset: 1em 0 auto 0 which doesn't make sense to me. the 1em is to space it from the top of the page but since i don't want any space at the bottom i would put 0 instead of auto but that stretches it for some reason which also confuses me. That only works if the .wrapper class is directly applied to the header. If it's wrapped in it my flex on header doesn't work and the content seems to get really long if you hover over it in dev tools. I'd appreciate any help explaining this. Thanks in advance....

how to calculate border values based on height and width in css for loaders

https://codepen.io/Vicky-clowdy/pen/GRVeYqy In this code i set 50px for height and width and set 8px for border So currently I create basic loaders for my project in react as re usable so I can reuse ...