I am trying to create a Single page application.
html content:
<div class="containerDiv">
<div class="headerDiv"></div>
<div class="contentDiv"></div>
<div class="footerDiv"></div>
</div>
All my application content will go inside contentDiv along with ng-view.
css content:
.containerDiv {
position: relative;
min-height: 100%;
background-color: beige;
}
.headerDiv {
height: 60px;
background: black;
width: 100%;
}
.contentDiv {
padding-bottom: 60px;
}
.footerDiv {
position: absolute;
left: 0;
bottom: 0;
right: 0;
background-color: pink;
width: 100%;
height: 60px;
}
Everything works fine with non-positioned elements and footer stay at the bottom, when content height increases.
I want to add positioned elements(absolute or relative) in the contentDiv as per my requirements.
When height of my positioned element increases, it breaks my page as footer remains at same position and elements overrides it.
Suppose I want to add a table in contentDiv
<div class="data">
<table>
</table>
</div>
I want to align table at particular location in html.
.data{
position:absolute/relative;
top: 300px;
left: 400px;
}
If height of the table increases, it will go out of the scope of footer. The height of the table is dynamic.