Despite using z-index: 4 as the highest layer, the element keeps disappearing from the screen. I can confirm that it is correctly applied through the browser console. Any suggestions are appreciated.
Please refer to the links below for images (I can't embed images in the question yet due to my Stackoverflow karma limitations). Relevant code provided below:
- Element disappearing under the yellowish overlay on the right
- Element missing from view, potentially hidden under the yellowish overlay to the right
- No issues with mobile view, z-index 4 displaying correctly
html {
height: 100%
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: Merriweather;
font-weight: 700
}
body {
height: 100%;
min-height: 35rem;
position: relative;
font-family: 'Source Sans Pro';
font-weight: 300;
}
html, body {
max-width: 100%;
overflow-x: hidden;
}
video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
transform: translateX(-50%) translateY(-50%);
z-index: 0
}
@media (pointer:coarse) and (hover:none) {
body {
background: url(../img/bg-mobile-fallback.jpg) #002e66 no-repeat center center scroll;
background-position: cover
}
body video {
display: none
}
}
.overlay {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: #cd9557;
opacity: .7;
z-index: 1
}
.masthead {
position: relative;
overflow: hidden;
padding-bottom: 3rem;
height: 80%;
z-index: 3
}
.masthead .masthead-bg {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
width: 100%;
min-height: 35rem;
height: 100%;
background-color: rgba(0, 46, 102, .8);
transform: skewY(4deg);
transform-origin: bottom right
}
.masthead .masthead-content h1 {
font-size: 2.5rem
}
.masthead .masthead-content p {
font-size: 1.2rem
}
.masthead .masthead-content p strong {
font-weight: 700
}
.masthead .masthead-content .input-group-newsletter input {
font-size: 1rem;
padding: 1rem
}
.masthead .masthead-content .input-group-newsletter button {
font-size: .8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
padding: 1rem
}
@media (min-width:768px) {
.masthead {
height: 100%;
min-height: 0;
width: 40.5rem;
padding-bottom: 0
}
.masthead .masthead-bg {
min-height: 0;
transform: skewX(-8deg);
transform-origin: top right
}
.masthead .masthead-content {
padding-left: 3rem;
padding-right: 10rem
}
.masthead .masthead-content h1 {
font-size: 3.5rem
}
.masthead .masthead-content p {
font-size: 1.3rem
}
}
.social-icons {
position: absolute;
margin-bottom: 2rem;
width: 100%;
z-index: 2
}
.social-icons ul {
margin-top: 2rem;
width: 100%;
text-align: center
}
.social-icons ul>li {
margin-left: .75rem;
margin-right: .75rem;
display: inline-block
}
.social-icons ul>li>a {
display: block;
color: #fff;
background-color: rgba(0, 46, 102, .8);
border-radius: 100%;
font-size: 1rem;
line-height: 2rem;
height: 2rem;
width: 2rem
}
@media (min-width:768px) {
.social-icons {
margin: 0;
position: absolute;
right: 2.5rem;
bottom: 2rem;
width: auto
}
.social-icons ul {
margin-top: 0;
width: auto
}
.social-icons ul>li {
display: block;
margin-left: 0;
margin-right: 0;
margin-bottom: 2rem
}
.social-icons ul>li:last-child {
margin-bottom: 0
}
.social-icons ul>li>a {
transition: all .2s ease-in-out;
font-size: 1rem;
line-height: 2rem;
height: 2rem;
width: 2rem
}
.social-icons ul>li>a:hover {
background-color: #002e66
}
}
@media (min-width:768px) {
.mastfoot {
color: #999 !important;
color: rgba(255, 255, 255, .5) !important;
position: absolute !important;
bottom: 10px !important;
margin-left: 4rem !important;
margin-right: 10rem !important;
z-index: 3
}
.inner-mastfoot {
font-size: 0.8rem;
text-align: left !important
}
}
.btn-secondary {
background-color: #cd9557;
border-color: #cd9557;
border-top-right-radius: 6px !important;
border-bottom-right-radius: 6px !important;
border-bottom-left-radius: 0;
border-top-left-radius: 0
}
.btn-secondary:active,
.btn-secondary:focus,
.btn-secondary:hover {
background-color: #ba7c37!important;
border-color: #ba7c37!important
}
.input {
font-weight: 300!important
}
.mastfoot {
color: #262626;
color: rgba(26, 26, 26, .5);
position: absolute;
bottom: 10px;
width: 100%;
margin-left: auto;
margin-right: auto;
z-index: 3
}
.inner-mastfoot {
font-size: 0.8rem;
text-align: center
}
.inner-mastfoot a {
color: inherit;
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: initial;
text-decoration: none;
-moz-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
-webkit-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
-ms-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
transition: color 0.2s ease-out, border-bottom-color 0.2s ease-in-out;
}
.inner-mastfoot a:hover {
text-decoration: none;
color: bolder;
border-bottom-color: transparent;
}
@media (min-width:768px) {
.nav-masthead .nav-link {
color: #262626 !important;
color: rgba(26, 26, 26, .5) !important;
}
.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
border-bottom-color: rgba(26, 26, 26, .5) !important;
}
.nav-masthead .active {
color: #000 !important;
border-bottom-color: #000 !important;
}
}
.masthead__navigation {
margin-bottom: 2rem;
padding-bottom: 0 !important;
width: 100vw !important;
}
.inner-masthead {
margin-bottom: 0;
z-index: 4 !important
}
.nav-masthead .nav-link {
padding: .25rem 0;
font-weight: 700;
color: #999;
color: rgba(255, 255, 255, .5);
background-color: transparent;
border-bottom: .25rem solid transparent;
z-index: 4 !important
}
.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
border-bottom-color: rgba(255, 255, 255, .5);
}
.nav-masthead .nav-link + .nav-link {
margin-left: 1rem;
}
.nav-masthead .active {
color: #fff;
border-bottom-color: #fff;
}
@media (min-width: 48em) {
.inner-masthead {
float: left;
}
.nav-masthead {
float: right;
}
}