Skip to content

Fix sponsor level image expanding behind the level description#446

Open
sedders123 wants to merge 1 commit into
mainfrom
fix-image-sizing-on-mobile-sponsor-page
Open

Fix sponsor level image expanding behind the level description#446
sedders123 wants to merge 1 commit into
mainfrom
fix-image-sizing-on-mobile-sponsor-page

Conversation

@sedders123

@sedders123 sedders123 commented Oct 14, 2022

Copy link
Copy Markdown
Member
Before (Mobile)

image

After (Mobile)

image

Before (Desktop)

image

After (Desktop)

image

Fixes #445

@sedders123 sedders123 requested a review from a team October 14, 2022 18:05
@PeterJCLaw

Copy link
Copy Markdown
Member

Any ideas why this works? Or I guess more specifically: why having the height there was causing the overlap?

@PeterJCLaw

Copy link
Copy Markdown
Member

Having read https://stackoverflow.com/questions/25305550/flexbox-one-element-fixed-height-other-filling and playing a bit I think the issue is potentially that while the flexbox div is limited to this height, the image wasn't and thus grew to its full height. The top of the image was not being hidden (not sure why) but the bottom overflow was.

An alternative fix therefore seems to be to add overflow: hidden to .sponsor-level-image. That would certainly be more robust to various image sizes rather than relying on them being pre-cropped to the right sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sponsor page broken at certain width

2 participants