Fix images overflowing on mobile by preserving aspect ratio
max-width: 100% alone lets img/picture height stay at intrinsic size, so on narrow viewports images could still overflow vertically or look squashed. Adding height: auto keeps the aspect ratio correct as width scales down. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
4569abc351
commit
11e2c469cb
5 changed files with 3 additions and 2 deletions
|
|
@ -56,6 +56,7 @@
|
|||
img,
|
||||
picture {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue