I have two divs: an outer div that is always 800 pixels high, and an inner div that’s 150 pixels high. The inner div is positioned 60 pixels from the bottom of the outer div.
The outer div is also vertically centered within the browser window.
<div id='outer'>
<div id='inner'>
some stuff
</div>
<div>
<styles>
#outer
{
position: relative;
text-align: left;
width: 1200px;
height: 800px;
min-width: 1000px;
min-height: 750px;
margin: 0px auto;
}
#inner
{
position: absolute;
background: rgba(10, 9, 9, .9);
height: 150px;
width: 100%;
z-index: 1;
bottom: 60px;
overflow: hidden;
}
I need to adjust my CSS so that if the browser window is less than 800 pixels high, the inner div is positioned 60 pixels from the bottom of the browser window (so that it stays visible), instead of 60 pixels from the bottom of the outer div.
But when the browser window is taller than 800 pixels, I want the inner div to be positioned 60 pixels from the bottom of the outer div.