Skip to content

Commit

Permalink
Fix container not being centered in IE8
Browse files Browse the repository at this point in the history
Since the header and the footer component use this container it also fixes centering for these components.
  • Loading branch information
NickColley committed Jan 17, 2019
1 parent fdf62ac commit 861baf2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/objects/_width-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// Limit the width of the container to the page width
max-width: $govuk-page-width;

@include govuk-if-ie8 {
width: $govuk-page-width;
}

// On mobile, add half width gutters
margin: 0 $govuk-gutter-half;

Expand All @@ -19,6 +15,13 @@
@include govuk-media-query($and: "(min-width: #{($govuk-page-width + $govuk-gutter * 2)})") {
margin: 0 auto;
}

@include govuk-if-ie8 {
width: $govuk-page-width;
// Since media queries are not supported in IE8,
// we need to duplicate this margin that centers the page.
margin: 0 auto;
}
}

@include govuk-exports("govuk/objects/width-container") {
Expand Down

0 comments on commit 861baf2

Please sign in to comment.