Skip to content

Highlight drawn incorrectly when body margins are 0 #394

Description

@carmacleod

I created a little landmarks test page, which I want to completely fill the browser's height and width without scrolling.
When I set CSS margin for body to 0;

  • the highlight border box is drawn a bit too small on the right (except for the nav)
  • the nav's highlight title is drawn too far to the right (the other highlight titles are drawn in the correct place)

To see the difference between correct highlighting and incorrect highlighting, first run the example and use Alt + Shift + N (Windows) to move through the landmarks. Note that the highlights are drawn a little bit off:

image

Now open DevTools (I'm using Chrome, but saw this in Firefox as well) and uncheck the body style for margin: 0;. The body inherits an 8px margin from the browser's style sheet, which causes an annoying vertical scrollbar, but the highlights are ok:

image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions