diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2014-11-04 15:23:27 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2014-11-04 15:44:34 +0000 |
commit | 5890095563269359385313253b45f6033de5e8f5 (patch) | |
tree | 19feb04eedb0f2422ff84ff47a8ef6ac0db5e9a9 | |
parent | cdf0d0f5129bd03a2f7990bee6c176cb77fabd3d (diff) |
EastSussex. z-index fixes for IE7
The #map_box div wasn't clickable, so we had to reset its z-index from the
broken -1 to 0. IE7 doesn't like setting z-index to 0 in javascript (as it's a
falsy value) so instead we set the z-index of parent and sibling elements (body
and site-header) to 1 to make sure they are visible.
position:relative in base.scss is to make sure that the header is now
shown (similar to @6296cb33)
See https://github.com/mysociety/FixMyStreet-Commercial/issues/639
-rw-r--r-- | web/cobrands/eastsussex/base.scss | 10 | ||||
-rw-r--r-- | web/cobrands/eastsussex/layout.scss | 1 | ||||
-rw-r--r-- | web/cobrands/eastsussex/position_map.js | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/web/cobrands/eastsussex/base.scss b/web/cobrands/eastsussex/base.scss index 9c72a8c47..6285b8662 100644 --- a/web/cobrands/eastsussex/base.scss +++ b/web/cobrands/eastsussex/base.scss @@ -46,6 +46,7 @@ h1.main { } #site-header { + position: relative; background: $primary; height: 76px; border-top-width: 4px; @@ -224,3 +225,12 @@ styling, but this doesn't dtrt with span, so adding ourselves */ #geolocate_link { font-size: 1.0em; } + +.ie6, .ie7 { + body { + z-index: 1; + } + #site-header { + z-index: 1; + } +} diff --git a/web/cobrands/eastsussex/layout.scss b/web/cobrands/eastsussex/layout.scss index 6dd3eaad8..c25d5ff0c 100644 --- a/web/cobrands/eastsussex/layout.scss +++ b/web/cobrands/eastsussex/layout.scss @@ -260,3 +260,4 @@ body.twothirdswidthpage .content aside { display: block; } } + diff --git a/web/cobrands/eastsussex/position_map.js b/web/cobrands/eastsussex/position_map.js index 30ee88c67..71794e8d6 100644 --- a/web/cobrands/eastsussex/position_map.js +++ b/web/cobrands/eastsussex/position_map.js @@ -2,14 +2,14 @@ function position_map_box() { var $html = $('html'); if ($html.hasClass('ie6')) { $('#map_box').prependTo('body').css({ - zIndex: -1, position: 'absolute', + zIndex: 0, position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: $(window).height(), margin: 0 }); } else { $('#map_box').prependTo('body').css({ - zIndex: -1, position: 'fixed', + zIndex: 0, position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: '100%', margin: 0 |