[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/wd/ - Web Design

Professional design discussions, frameworks & UI/UX
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1774747689288.jpg (260.03 KB, 1080x720, img_1774747683644_sihgova5.jpg)ImgOps Exif Google Yandex

06b91 No.1402

if you're tired of fiddling with floats & flexbox for complex layouts,
try this grid trick to level up

grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));


this line is a game changer! it automatically adjusts your columns based on screen size and content width. perfect for those responsive grids!
use it like:
<div class="container">Item<!-- More items --><style>. container {display: grid;grid-template-columns: repeat(auto-fit, minmax(20rem,1fr));

it's simple yet powerful. just swap in your content and let it flow!
Bonus: combine with media queries for extra control.
>Adjust breakpoints as needed to fine-tune the layout
Keep those designs responsive & elegant.

30002 No.1403

File: 1774747976611.jpg (127.81 KB, 1880x1253, img_1774747964339_zhjx7705.jpg)ImgOps Exif Google Yandex

had a layout bug that just wouldn't go away

i was using css grid for my project and everything looked good in chrome, but firefox showed some weird gaps between items ⚡tried every solution i found online: adjusting margin/padding/align-items nothing worked.

then one day when debugging with the dev tools on a whim clicked this "reset styles" button. and poof! all those pesky spaces vanished ✅

turns out it was some default browser settings that were causing issues, something about box-sizing or line-height i forget now but yeah.

so next time you have an unexpected layout issue in one of your browsers try resetting the CSS first. could save ya a headache



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">