2
I have 4 Ivs on my page, next to each other, as I can do, so that the last div is aligned left on the bottom line ?
My Code:
<!-- DIV 1 -->
<div style="float: left; width: 100px; height: 50px; background-color: #CCCCCC; border-style: solid; border-size: 1; border-color: #FFFFFF;">1</div>
<!-- DIV 2 -->
<div style="float: left; width: 100px; height: 50px; background-color: #CCCCCC; border-style: solid; border-size: 1; border-color: #FFFFFF;">2</div>
<!-- DIV 3 -->
<div style="float: left; width: 100px; height: 100px; background-color: #CCCCCC; border-style: solid; border-size: 1; border-color: #FFFFFF;">3</div>
<!-- DIV 4 -->
<div style="float: left; width: 100px; height: 50px; background-color: #CCCCCC; border-style: solid; border-size: 1; clear: Left; border-color: #FFFFFF;">4</div>
<!-- DIV 5 -->
<div style="float: left; width: 100px; height: 50px; background-color: #CCCCCC; border-style: solid; border-size: 1; border-color: #FFFFFF;">5</div>
As it was after inserting the clear:left.
Problem 2 - After using ( clear:left ).
Another problem arose, I need to fit the div’s as per the image below, I want to do this using only CSS and without using the margin top, I need to do this using some pure CSS solution. The numbers within the DIV’s refer to the sequence in which the DIV’s are displayed by PHP coming from Mysql.
Thank you
Is this what you’re looking for? -> https://jsfiddle.net/r7Lwtu6y/
– Sergio
Exactly, but I had a problem, as the div at the end is wider than the others, when she jumps in line, she’s not fitting in with the top one, there’s a space, what can I use ? I updated my topic.
– abduzeedo
Thanks for the tip.
– abduzeedo