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

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1791536355367.jpg (269.96 KB, 1024x1024, img_1791536347673_715faa34.jpg)ImgOps Exif Google Yandex

5ae5c No.2198

Been seeing too many people setting width to 100% without any max-width. It makes the image huge on desktop monitors and just looks broken. I usually stick to this for my main hero assets:
img {width: 100%;max-width: 800px;}

It keeps things from looking stretched pixelated when the viewport gets massive.

5ae5c No.2227

>>2198
setting a hard 800px cap is gonna break your layout on high-res displays. better to use object-fit: cover and just let the container handle the scaling via aspect-ratio. react devs love breaking things



[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 ]