Here is the code for my main page:
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<style type="text/css">
div
{
width:100%;
height:100px;
background-color:rgba(189,123,124,1.00);
position:absolute;
bottom:0;
/* ensure this div remains on top */
z-index:9000;
}
.container
{
/* make sure the loaded page appears below the div */
z-index:200;
}
</style>
</head>
<body>
<div>
<div class="container">
</div>
</div>
<script type="text/javascript">
$(document).ready(function()
{
$(window).on("click", function()
{
$("div.container").load("Page1.html");
});
});
</script>
</body>
As shown above, I have attempted to keep the red div bar at the bottom always visible even when Page1.html is loaded upon clicking the browser window.
Now, let's take a look at the code for Page1.html:
<head>
<style type="text/css">
body, html
{
height:100%;
}
div
{
width:100%;
height:100%;
background-color:rgba(171,147,136,1.00);
}
</style>
</head>
<body>
<div>Page One</div>
</body>
However, upon loading Page1.html, it covers the red div bar completely and the bar disappears. It seems that the Z-Index property is not effective here. How can I resolve this issue?
You can view the actual page here: