If I have a collection of div elements, I can use CSS so that they flow through the page and overflow to the next line.
Here is a simple example:
<html> <head> <title>Flowing Divs</title> <style type="text/css"> .flow { float: left; margin: 4em 8em; } </style> </head> <body> <div class="container"> <div class="flow">Div 1</div> <div class="flow">Div 2</div> <div class="flow">Div 3</div> <div class="flow">Div 4</div> <div class="flow">Div 5</div> <div class="flow">Div 6</div> <div class="flow">Div 7</div> <div class="flow">Div 8</div> </div> </body> </html>
Is it possible for divs to flow down the page, and not over it, that they flow down the columns not along the lines, but still occupy the same space as if they flowed?
So, for the example above, if they flowed in two rows of four divs, could I get the first column containing Div1 and Div2 instead of Div1 and Div5?
css css-float
Braster
source share