From 5f24a2c477889d28bc46bc786b7d95e194f26910 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Thu, 17 Jan 2019 11:16:39 +0000 Subject: [PATCH 1/2] Fix container not being centered in IE8 Since the header and the footer component use this container it also fixes centering for these components. --- src/objects/_width-container.scss | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/objects/_width-container.scss b/src/objects/_width-container.scss index f97d8e798d..2f38e8bc11 100644 --- a/src/objects/_width-container.scss +++ b/src/objects/_width-container.scss @@ -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; @@ -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") { From 52f3ac592547a6c9d6237e5e7bea6788f2419746 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Thu, 17 Jan 2019 11:34:43 +0000 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3821692fa1..297f62ed6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,12 @@ ([PR #1148](https://github.com/alphagov/govuk-frontend/pull/1148)) +- Fix container not being centered in IE8 + + Since the header and the footer component use this container it also fixes centering for these components. + + ([PR #1147](https://github.com/alphagov/govuk-frontend/pull/1147)) + ## 2.5.1 (Fix release) 🔧 Fixes: