Use the values table
+table-cell
to the property display
of the CSS:
.div-pai {
display: table;
width: 100%;
}
.div-filha-esquerda, .div-filha-direita {
display: table-cell;
width: 50%;
}
This will make the Divs sets behave as a table, aligning their heights.
Obviously, nay works in IE < 8.
If have to support IE<8, use a conditional comment to include CSS alignment (here and here), or, ultimately, by Javascript.
If you want only part of the content to be stretched to the end, use position:absolute
with bottom: 0
and the top: [xx]px
. Where [xx] is the top fixed offset. If you want something more dynamic, you have to use Javascript, I believe.
.conteudo-esticado {
position: absolute;
top: 85px;
right: 0;
bottom: 0;
left: 0;
}
.div-esticado-esq, .div-esticado-dir {
float: left;
height: 100%;
width: 50%;
}
.paginas {
display: table;
max-width: 1024px;
width: 100%;
}
.paginas-coluna1,
.paginas-coluna2 {
display: table-cell;
position: relative;
width: 50%;
}
.paginas-coluna1 { background: #ff9999; }
.paginas-coluna2 { background: #9999ff; }
.conteudo-espichado {
border: 1px solid #000;
position: absolute;
top: 85px;
right: 0;
bottom: 0;
left: 0;
width: 100%;
}
.div-espichada-esq, .div-espichada-dir {
float: left;
height: 100%;
width: 50%;
}
.div-espichada-esq { background: #dd4444; }
.div-espichada-dir { background: #4444dd; }
<div class="paginas">
<div class="paginas-coluna1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla molestie turpis quis urna dapibus gravida. Maecenas ac mi id nibh volutpat ultrices. Duis vehicula nec urna ac volutpat. Nulla nec tortor sit amet diam iaculis euismod. In hac habitasse platea
dictumst. Nulla facilisi. Quisque consequat quam id leo efficitur hendrerit. Pellentesque luctus mattis massa, quis dapibus erat ullamcorper ut. Nunc neque justo, consequat ac nunc nec, molestie dictum nisi. Pellentesque suscipit ac nunc id bibendum.
Ut nec pharetra odio. Maecenas gravida erat vel condimentum tempus. Duis sit amet massa lobortis, pellentesque sapien et, feugiat mauris. Curabitur ac urna nec magna bibendum dapibus id sit amet ex. Sed et leo posuere, aliquam mi vel, auctor lorem.
Cras blandit orci vel diam ullamcorper commodo.
</div>
<div class="paginas-coluna2">
<div style="height:80px">imagem aqui por exemplo, ou uma div com altura fixa</div>
<div class="conteudo-espichado">
<div class="div-espichada-esq">conteudo</div>
<div class="div-espichada-dir">conteudo</div>
</div>
</div>
</div>
<br>
<br>
<div class="paginas">
<div class="paginas-coluna1">
</div>
<div class="paginas-coluna2">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla molestie turpis quis urna dapibus gravida. Maecenas ac mi id nibh volutpat ultrices. Duis vehicula nec urna ac volutpat. Nulla nec tortor sit amet diam iaculis euismod. In hac habitasse platea
dictumst. Nulla facilisi. Quisque consequat quam id leo efficitur hendrerit. Pellentesque luctus mattis massa, quis dapibus erat ullamcorper ut. Nunc neque justo, consequat ac nunc nec, molestie dictum nisi. Pellentesque suscipit ac nunc id bibendum.
Ut nec pharetra odio. Maecenas gravida erat vel condimentum tempus. Duis sit amet massa lobortis, pellentesque sapien et, feugiat mauris. Curabitur ac urna nec magna bibendum dapibus id sit amet ex. Sed et leo posuere, aliquam mi vel, auctor lorem.
Cras blandit orci vel diam ullamcorper commodo.
</div>
</div>
I liked the image, it’s very explanatory, but there’s no way you could make an example with a small part of it in the snippet code (it’s a button that adds executable code when you’re creating the question that looks like jsfiddle) or in http://jsfiddle.net :D itself
– Paulo Roberto Rosa
Paul, thank you for your support, I am providing the code as requested :)
– Leonardo Max
Google Sticky Footer. I think this solves your problem.
– dsantoro