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

Content on pages move horizontally depending on if a scrollbar is on screen or not #1204

Closed
edwardhorsford opened this issue Feb 18, 2019 · 2 comments

Comments

@edwardhorsford
Copy link
Contributor

Content in the template is centred on the page. If the page has a scrollbar, this will be slightly to the left. If the page doesn't have a scrollbar, the content is slightly to the right.

If a user moves between tabs / sections of the site, this makes the GOV.UK logo and other things appear to jump about. Ideally when using navigation links, everything would stay in position.

Example:
govuk-template-scrollbar-or-not

On my personal site I've gotten around this by using margin-left: calc(100vw - 100%); on body - which adds a left margin equal to the width of a scrollbar.

@NickColley tells me that @colinrotherham also raised this recently and suggested this:

@media only screen {
  .container {
    overflow-y: scroll;
  }
}
@NickColley NickColley added the awaiting triage Needs triaging by team label Feb 18, 2019
@NickColley
Copy link
Contributor

NickColley commented Feb 18, 2019

@36degrees
Copy link
Contributor

Fixed in #1230

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

No branches or pull requests

4 participants