So I am using the input checkbox to toggle on/off the mascot logo on top of the main container div's background. The logo has to start in the top 0 left 0 just like the background but when I toggle it on to show the mascot logo the menu with the check boxes is hidden.
My z-index won't work and I am looking for any solutions to keep the menu group of checkboxes on top of all.
Thanks
body, html {
height: 100%;
}
#map {
background-image: url(https://image.freepik.com/free-vector/vector-illustration-mountain-landscape_1441-71.jpg);
height: 1080px;
width: 1080px;
background-position: center;
background-repeat: no-repeat;
background-size: 1080px 1080px;
position: relative;
}
#menu {
display: block;
width: 100px;
}
input:checked + .hidable {
display: none;
position: absolute;
z-index: 10;
}
input:not(:checked) + .showable {
display: none;
position: absolute;
z-index: 10;
}
#mascot1 {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<title>Splash Page</title>
</head>
<body>
<div id="map">
<div id="menu">
<input type="checkbox" /> Mascot 1
<div class="showable"><img id="mascot1" src="https://banner2.cleanpng.com/20180510/fkq/kisspng-tiger-mascot-5af4168e2aa482.2537194215259459981747.jpg" alt="Map Locations"></div>
<input type="checkbox" /> Mascot 2
<div class="showable"><img id="mascot2" src="https://banner2.cleanpng.com/20180510/fkq/kisspng-tiger-mascot-5af4168e2aa482.2537194215259459981747.jpg" alt="Map Locations"></div>
<input type="checkbox" /> Mascot 3
<div class="showable"><img id="mascot3" src="https://banner2.cleanpng.com/20180510/fkq/kisspng-tiger-mascot-5af4168e2aa482.2537194215259459981747.jpg" alt="Map Locations"></div>
</div>
</div>
</body>
</html>
as it breaks things. I have edited my original code above.. – user3146788 May 29 '20 at 23:46