Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Weird layout shift with max-width - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
2y ago
•
3 replies
Tim
Weird layout shift with max-width
I have this dead simple code
:
https://codepen.io/t1mp4/pen/abrYzpN
Why does the horizontal position of the body change when I replace the image with text
? The shift is subtle but noticeable and weird
.
I have only tried it in Brave Browser
(Chromium
-based
) and Firefox
. For some reason
, the layout doesn
't change in Firefox
, only in Brave
.
When I change the image height to some other value
, say 100px
, the layout shift is gone for some reason
.
I
'm confused
.
CodePen
tim
abrYzpN
.
.
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Max width with fr in grid.
KP-C
Kevin Powell - Community / front-end
3y ago
Max-width acting weird when it is getting % value
KP-C
Kevin Powell - Community / front-end
3y ago