I am very new to HTML, CSS and angular.
I am trying to create an angular app and where I have three main div on the screen 1. header 2. content 3. footer
The idea is page should be fixed and cannot be scroll. Header and footer always stick to top and bottom. the middle part is content which is scroll-able only. contents should not be overlapped by header and footer. Layout should work with different type of devices and screen.
Here is the fiddle for the same but it is overlapping conents.
I achieve it with fixed size of screen but not with different size.
here is my another code...
html {
height: 100%;
overflow: hidden;
}
body {
min-height: 100%;
}
<body>
<app-root class="h-100 w-100 align-items-center"></app-root>
</body>
.headerdiv {
margin-top: 0px;
height: 60px;
min-height: 60px;
}
.contentdiv {
position: relative;
overflow: scroll;
min-height: 91%;
}
.footerdiv {
position: relative;
overflow: hidden;
margin-bottom: 0px;
padding-bottom: 0px;
height: 20px;
min-height: 20px;
width: 100%;
background-color: darkblue;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div class="headerdiv">
<app-hsbc-header-bar></app-hsbc-header-bar>
</div>
<div class="contentdiv">
<div>
<router-outlet></router-outlet>
</div>
</div>
<footer class="footerdiv">
<app-application-footer></app-application-footer>
</footer>
Can anyone help me with this.