how can i put the div's from top to buttom and left to right
example: http://jsfiddle.net/ZWxGW/2/
http://jsfiddle.net/ZWxGW/2/
SOLUTION
http://jsfiddle.net/pMbtk/33/
how can i put the div's from top to buttom and left to right
example: http://jsfiddle.net/ZWxGW/2/
http://jsfiddle.net/ZWxGW/2/
SOLUTION
http://jsfiddle.net/pMbtk/33/
You can use the column-count
property for this type of function:
Check my previous answers for this
I want to show list items as 2 or more columns (dynamic alignment)
you can try this...
ul {
width:60px; height: 60px;
}
ul li{
float:left;
width:20px;
list-style:none;
}
ul, ul li {
-moz-transform: rotate(-90deg) scaleX(-1);
-o-transform: rotate(-90deg) scaleX(-1);
-webkit-transform: rotate(-90deg) scaleX(-1);
-ms-transform: rotate(-90deg) scaleX(-1);
transform: rotate(-90deg) scaleX(-1);
/* IE8+ - must be on one line, unfortunately */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-3.061616997868383e-16, M12=1, M21=1, M22=3.061616997868383e-16, SizingMethod='auto expand')";
/* IE6 and 7 */
filter: progid:DXImageTransform.Microsoft.Matrix(
M11=-3.061616997868383e-16,
M12=1,
M21=1,
M22=3.061616997868383e-16,
SizingMethod='auto expand');
}
untested in IE http://jsfiddle.net/rlemon/Y5ZvA/3/
.message {
width:90px;
margin:3px;
background-color:#dfdfdf;
float : left;
}
Try this if left to right and top to bottom works out for you.
1) In this case you have to take column div(s) (red colored in image) and you have to put other divs 1,2,3,4 inside this div... as in image
give below properties to div.
.message,.outer_div{
float:left;
height:auto;
width:200px;
}
2) in another case,
if you want from left to right,top to bottom, then you don't need to have a outer div...specified in red color
Remove height from contentDiv and put float:left;
so that it wraps your content.
I tried this in your example:
.message {
width:90px;
margin:3px;
background-color:#dfdfdf;
position:absolute;
}
and it helps.
Good-Luck !