I'm trying to make a div position itself at the bottom of the window, fixed location so that regardless of my scroll position it always stays at the bottom, and inside it has layered children divs.
Basically I've got a wrapper div, and inside I've got 2 child divs. One of the child divs displays completion percentage text, the other a progress bar. I want the text div to be on top of the progress bar div, and all of it to be inside the wrapper div, at the bottom of the window. Here is my HTML and CSS:
CSS
HTML
This should work, but what I get instead is the wrapper div positioned at the top of the window and the text and progress bar positioned at the bottom, layered properly.
There has to be a way to make this work!
Basically I've got a wrapper div, and inside I've got 2 child divs. One of the child divs displays completion percentage text, the other a progress bar. I want the text div to be on top of the progress bar div, and all of it to be inside the wrapper div, at the bottom of the window. Here is my HTML and CSS:
CSS
Code:
<style>
body {
margin: 0px;
}
#progress_wrapper {
position: fixed;
bottom: 0px;
margin: 0px auto;
width: 100%;
height: 20px;
background-color: gray;
z-index: 0;
}
#progress {
position: absolute;
bottom: 0px;
left: 0px;
height: 100%;
border-right: 1px solid black;
background-color: #0f81a7;
z-index: 50;
}
#progress_text {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
height: 100%;
color: #FAFAFA;
text-align: center;
z-index: 100;
}
</style>
Code:
<div id="progress_wrapper"> <div id="progress_text">Loading...</div> <div id="progress" style="width: 0%;"></div> </div>
There has to be a way to make this work!
Comment