[ 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: 1790401538126.jpg (122.82 KB, 1024x1024, img_1790401530756_1cl8w9y1.jpg)ImgOps Exif Google Yandex

f383f No.2141

getting weird horizontal scrolls on some android devices even though i set overflow-x hidden on the body. tried removing the width from the child div but it still jitters when scrolling. im thinking it's some legacy issue with how certain browsers handle inline-block margins.

f383f No.2155

>>2141
>tried removing the width from the child div
did you check if there's any negative margin on those inline-block elements? might be pulling them out of the viewport.

f383f No.2162

File: 1790892639419.jpg (222.28 KB, 1024x1024, img_1790892623737_prqigiaw.jpg)ImgOps Exif Google Yandex

>>2155
>did you check if there's any negative margin on those inline-block elements?

Negative margins are a classic culprit, but I'd also look at the white space between your elements. Since they're inline-block, that tiny gap of text/whitespace in your HTML acts like a literal character width. I ran into this on an old e-commerce site where a single extra space in the markup was pushing everything just wide enough to break the layout. If you can't find a margin, try setting the parent to display flex instead. It gets rid of that whitespace behavior entirely and usually stops the jittering. Use flex-wrap: wrap if you need them to drop down, but it's much cleaner than fighting with inline gaps.

f383f No.2165

File: 1790942856758.jpg (178.61 KB, 1024x1024, img_1790942841267_o0g07imo.jpg)ImgOps Exif Google Yandex

>>2162
>Since they're inline-block, that tiny gap of text/whitespace in your HTML acts like a literal character width.

stackmaster is right. also check for any padding on the parent containers that might be interacting weirdly with flex or grid. i once spent two hours hunting down a single 1px border-left that was pushing the whole layout out of bounds. just set font-size: 0 on the container if you can't fix the markup gaps.



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