2
This is an example of what I’m trying to adjust:
* {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
}
#topo {
background: limegreen;
position: static;
left: 60px;
top: 35px;
width: 100%;
line-height: 200px;
}
#conteudo {
background: white;
border: 1px solid silver;
position: absolute;
left: 15%;
top: 15%;
margin: 0 auto;
width: 70%;
height: auto;
}
#rodape {
bottom: 0;
width: 100%;
line-height: 50px;
position: relative;
background: limegreen;
text-align: center;
}
<div id="topo">
<h1>Titulo</h1>
</div>
<div id="conteudo">
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<p>lorem ipsum</p>
</div>
<div id="rodape">RODAPE</div>
Note that I am trying to remain the div
called as footer, below the div
calling for contents.
The task can be done using both CSS and Javascript, as long as you do not drastically change the layout here arranged in the example. For the design reflects the actual design, and altering it unexpectedly will cause in a re-design.
So I want to know what can be done. It is noteworthy that the rule fixed
is not welcome in case.
But you want the footer to be exactly below the content or fixed at the bottom of the screen?
– LeAndrade
One way to settle this would be with Flexbox, for you would be bad to use it? Better than using float.
– LeAndrade
That’s what @hugocsl posted as a response using flexbox.
– LeAndrade