@J.Jones you have to use the clear:both
in the group to break the flotation when using Float
in the elements. To solve your problem I created a Div
on the outside called . group and in it I created a pseudoelement ::after
and used the style clear:both
to clear the flotation and play the rodape
down. Take a look at the code you’ll understand.
OBS I made a few changes to your CSS just to get a better look at what was done.
Click on EXECUTE to see the code working
#DivRodape{
position: absolute;
top: auto;
height: 35px;
line-height: 35px;
text-align: center;
width: 100%;
background-color:#004085;
}
#DivLateral{
position:relative;
border-width:2px;
width:100px;
height: 100px;
background-color: peachpuff;
float: left;
}
#DivA{
position: relative;
border-width:2px;
width: 100px;
height: 100px;
left:0px;
background-color: red;
float: left;
}
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
.group {
zoom: 1; /* For IE 6/7 (trigger hasLayout) */
}
<div class="group">
<div id="DivA"></div>
<div id="DivLateral"></div>
</div>
<div id="DivRodape"></div>
Search on "Clear Fix CSS" and you will see several examples.
Here is a reference source in Portuguese
https://edsonjunior.com/entendendo-float-clear-clearfix/