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

Getting white space when keyboard appears in mobile browser

I have this chat app in HTML CSS and JavaScript, when I click the input field in mobile the virtual keyboard appears but it is adding a white space. How to remove this whitespace, any idea? Here is the codepen: https://codepen.io/jawad-ul-hassan/pen/JjQvaNr...

i want to change color of the active nav link in react

```const Navbar = () => { const {pathname} = useLocation(); return (...

Input inner text limit

Question might be a bit weird but basically in the screen you can see an html input element with a value in it. Its value rn is, 12.123456. As you can see, it gets cut after 12 with a HUGE space at the right size. This has no inner padding/margin, this is default behavior. How can I at least decrease that space at the end ?
No description

How to Center Navigation Content and Ensure Background Stretches Full Width on Large Screens?

Hello everyone, I'm trying to optimize my website's navigation bar for large screens, and I'm facing two issues: 1. The content inside the navigation bar is not centered when the screen width exceeds 800px....

How much is too much css? (cube css)

Hey guys, I built this webpage, i used cube CSS, came up with some composition classes, utitlity classes and some button and card classes. My total lines of code came to about 300. It does have animations on hover for the nav bar(dropdown menu with border color lighting up) I'm worried it seems like a lot, however the cube method has allowed my code to be easily modified, is understandable and editable (more than my bem), it's also lead to nice efficient lines of code in certain places. I want to know what you guys think? too much? or does the amount not matter...
No description

Broken images do not respect css?

I am using a headless cms approach, and my backend got hacked -.- I noticed something: when image links are broken, besides the obvious effect of them not appearing, they won't respect our CSS. I am using grid, I am setting img as block and the whole max-width 100% thing, and I tested with huge placeholder images, but they fit as I would expect. Broken links generate overflow though. ...

Unable to apply Display Flex in ReactJs.

I am trying to map my card content and show them as rows but the cards are stacked vertically. I have spent more than two hours on this. Could anyone look into this please?
No description

Why is my top grid area so tall? Why is my address not aligned right?

https://blacklodgeresearch.github.io/website/about/ I'm using grid-template-areas to define an area for the name of the hackspace top left, and nav bar for the rest of the top row. It appears to have more vetical height than I as expecting, and I would prefer it to collapse down to the max-height of the hackspace's name (plus some padding that I understand). My browser inspector tells me that the vertical height is large, not the padding or the margin....

How do I use the CSS Grouping selector for several children

I want to set the style of a, a:hover, a:visitied and a:active, in the nav section of my site separately from the rest of the site. I thought I'd use a CSS selector of nav a, a:hover, but this selects nav a and a:hover not nav (a and a:hover). Is there a ... brackets for this, like for math?

Math in JS.

Can anyone please go through the code and let me know why converting from dollar to cents gives wrong result Steps: $32.5:Converting to cent->32*100=3200. value after decimal point is cent =0005. $10 to be charged extra if cost is less than $40 so $10 gets converted into cents as =1000...

react snippets not working

i tried to type createBrowserRouter and ReactDOM, but i got no snippet suggestion even though i have the react snippets installed

Outline transition duration issues

https://gyazo.com/9989a2e09cee6d53cbac555ef24d155a I'm trying to apply a duration on the outline for the start button, for some reason, it has a weird delay, not sure if you can notice. It immediately loads the outline, a bit, then, immediately loads the rest after. It's not smooth. Here's the code: ```js...

How do I choose column from 1-12 and make it auto responsive using grid?

Hello, I have tried to google and find YouTube videos, but I cannot find any solutions to my issue. The goal is that I know we could specify using the grid-template-columns with the trick of repeat() and auto-fill to make it automatically responsive:...

I'm stuck on Grid and Position

I want to place 7 svg images in the header of the page, which are in their own div, exactly on a specific point of the page, and at the same time, use the grid layout for responsiveness, and the photos will stay in their place with the zoom in and zoom out of the page, but be in tune with the grid flow. Sample codes: https://codepen.io/chegudev/pen/KKjorYK ...

Media Queries

Hello Guys, these are the media queries I use, Can you chip in some advice if I am doing it wrong or right? Thanks I do desktop to mobile, it's just a preference that's it. /* 2xl */ @media (max-width: 1536px) {...

How to recreate this component with (optional: TailwindCSS)

I am trying this but I don't know why I can't make this happen, everything is failing, clip path, background image etc, mission impossible for me, I would love to see how some CSS Wizards would solve this with the fade inside with the dotted pattern bg, fading border and nozzle grain bg ish. Thank you! ❤️ I don't have any URL, otherwise I would inspect it and see how they have done it....
No description

grid breaking my brain

https://codepen.io/Miss-Fox/pen/WNqzOdm?editors=1010 each .collections-item is the same width.... each .collections-item .img-wrapper__lg is the same width... each .img-wrapper is the same aspect-ratio .... and has an overflow: hidden.... so why does the last one have a gap in between the three small images and the first two , their row of three images overflows onto each other?...
No description

how to Remove border in input while focus in css

```css #search{ width : 300px; height:50px; padding-left:10px; ...
No description

gulp add source maps from compiled scss file

Hi, i have this gulpfile.mjs in my project. I want to add source map from my SCSS file. How can i fix this? It does not generate map, i need it for better debugging