Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix footer overlap on Internet Explorer 11 #4561

Merged
merged 1 commit into from
Jul 2, 2021
Merged

Fix footer overlap on Internet Explorer 11 #4561

merged 1 commit into from
Jul 2, 2021

Conversation

javierm
Copy link
Member

@javierm javierm commented Jun 19, 2021

References

Background

There are two bugs in Internet Explorer which caused our footer to be rendered incorrectly.

First, the flex: 1 property doesn't work so well when flex-direction is set to column. We're replacing it with flex-grow: 1. No need to set other flex-basis nor flex-shrink in this case since in this case the default values will work just fine.

Second, it didn't handle the body height being set to 100% so well, and the footer was rendered after that 100% point, even if the content still continued.

Objectives

Make sure the page can be read by users of all browsers

Visual changes

These screenshots were taken on Internet Explorer 11.

Before these changes

The footer is rendered in the middle of the page, overlapping with the main content

After these changes

There's no overlap and all elements are rendered properly

Notes

These changes cause a different issue since now IE won't handle the flex-grow: 1 property correctly. This will only affect IE users with very large screens, though, and it's way better than rendering the footer overlapping the main content, so we can live with that. The page won't look as great as in other browser, but it will still be usable.

@javierm javierm added the UX label Jun 19, 2021
@javierm javierm self-assigned this Jun 19, 2021
@javierm javierm force-pushed the ie_flex branch 2 times, most recently from 89ba369 to 3ff1c94 Compare June 30, 2021 12:53
There are two bugs in Internet Explorer which caused our footer to be
rendered incorrectly.

First, the `flex: 1` property doesn't work so well when `flex-direction`
is set to `column`. We're replacing it with `flex-grow: 1`. No need to
set other `flex-basis` nor `flex-shrink` in this case since in this case
the default values will work just fine.

Second, it didn't handle the body height being set to `100%` so well,
and the footer was rendered after that 100% point, even if the content
still continued.

So we're using `min-height` instead, which is actually a bit more
accurate (since the body is usually taller than the document root
element). This causes a different issue since on IE the `flex-grow: 1`
property becomes useless. This will only affect IE users with very large
screens, though, and it's way better than rendering the footer
overlapping the main content, so we can live with that. The page won't
look as great as in other browser, but it will still be usable.
@taitus taitus self-assigned this Jul 2, 2021
@javierm javierm merged commit 0a5dd09 into master Jul 2, 2021
@javierm javierm deleted the ie_flex branch July 2, 2021 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants