allocatebeats
allocatebeats
KPCKevin Powell - Community
Created by allocatebeats on 6/6/2024 in #front-end
Inconsistent gap on my phone, not in laptop.
I am using Vite for my projects, and adding "dev": "vite --host" to my package.json file so I can see the application on my phone as well. Whenever I try to use grid or flex for a container and add a gap to its children, it looks good on my laptop but not on my phone. I set a 1px gap (also tried other gap values) and the best way to describe my problem is as if some child elements have 2px gap, some others 1px gap, and it looks inconsistent. Tried many things and suggestions from ChatGPT but nothing worked. I tried giving hard-coded values, setting flex: 1, my phone keeps on showing inconsistent gap spaces. Kind of annoying, might be my phone being a bit old but there should be a fix for this I guess. Any ideas or suggestions? Anyone else had this problem before?
5 replies