I am currently working on an angularJS web app with a basic template structure:
<html>
<head>
<link rel="stylesheet" href="style.css" />
</head>
<body id="top">
<!-- Templates with views will be inserted here -->
<div class="wrapper" ng-view>
<div class="language-loaded">
<div class="home-top">
<div class="title-wrapper">
<h1 class="home-title">Title</h1>
</div>
</div>
<div>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
</div>
</div>
</div>
<!-- This is the footer template -->
<div ng-include src="'partials/footer.html'">
<footer id="footer">
This is the footer
</footer>
</div>
Upon rendering, the web page appears as follows:
HTML:
<body id="top">
<div class="wrapper">
</body>
</html>
CSS:
html, body, .wrapper, .language-loaded, .home-top {height: 100%}
body { background-color: #F5F5F5}
.home-top {background-color: blue;}
.title-wrapper {
position: relative;
top: 39%;
color: #fff;
text-align: center;
}
Some components have a height of 100% to ensure that the homepage displays a background image that spans the full height. However, this causes the footer to appear overlapping the main content directly below the background image.
To better understand the issue, please refer to the following Plunker link: https://plnkr.co/edit/gyNOJmc5uzHAEhXwzRuq?p=preview
My goal is to reposition the footer to the bottom of the page, after all the main content has been displayed.