Port of 26883-members-page-layout-looks-broken to EE
EE port of the following MR:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8650#note_28108890
EE port of the following MR:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8650#note_28108890