CSS placement and div block position

I have this problem, then I try to float the div on the left, each block contains the same div class (member).

The block rises if it is on the right, but does not work on the left.

Any thoughts?

.member { float: left; position: relative; width: 422px; margin: 0px 10px 10px 0px; height: auto; } 

example

image with an example

+4
source share
1 answer

I assume that you need two columns with blocks of different heights.

Then you need to put one column to the left and the second to the right:

Like this:

 .member { position: relative; width: 422px; margin: 0px 10px 10px 0px; height: auto; } .fl_left { float: left; clear: left; } .fl_right { float: right; clear: right; } 

HTML:

 <div id="left"> <div class="fl_left"> <div class="member"></div> <div class="member"></div> </div> <div class="fl_right"> <div class="member"></div> <div class="member"></div> </div> </div> 
+3
source

Source: https://habr.com/ru/post/1391232/


All Articles