By setting the div to position: absolute, you're taking it out of the normal flow of the page, causing content to overlap.
If your previous HTML structure has a container like a div wrapping the top section, avoid using "position: absolute". Instead, use width: 100% and margin: 0 auto; The issue lies in the code preceding the footer, not the footer itself.
In the case of a div, make sure to specify a minimum height using min-height. This will allow the content inside to expand without overflowing and pushing the footer down. Avoid using just 'height' as it may cut off overflowing content.
Here's a basic example:
body {
background-color: #d6d6d6;
}
.header {
background-color: #006F8D;
color: #fff;
margin: 0 auto;
width: 600px;
height: 100px;
}
.center {
background-color: #fff;
color: #454545;
margin: 0 auto;
width: 600px;
min-height: 100px;
}
.footer {
background-color: #fff;
color: #454545;
margin: 0 auto;
width: 600px;
height: 50px;
border-top: 1px solid #ccc;
}
For the CSS, here is a simplified version of the HTML:
<div class="header">menu 1 - menu2 - menu3</div>
<div class="center">Content Area</div>
<div class="footer">Footer</div>
If you require absolute positioning for the footer, let me know for further assistance. Also, it's advisable to refrain from using deprecated tags such as font or center in your code.