Strength div in left column

I have a container div with the following

CSS

  #container {
  column-count:2;
  }

Inside the div container there are several other divs, as shown in

HTML

 <div id="container">
 <div id="box1"></div>
 <div id="box2"></div>
 <div id="box3"></div>
 </div>

Is there a way to force "box2", for example, into the left column.

Thank,

Jack

+4
source share
2 answers

Try this css script:

#box2{
float:left;
display:block;}

That should work.

0
source

Try this css code (example in codepen: http://codepen.io/dws/pen/EyALrp ):

#container {
    display: -webkit-box;
    display: -moz-box;
    display: box;

    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
}
#box1 {
    -webkit-box-ordinal-group: 2;
    -moz-box-ordinal-group: 2;
    box-ordinal-group: 2;
}
#box2 {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    box-ordinal-group: 1;
}

#box3 {
    -webkit-box-ordinal-group: 3;
    -moz-box-ordinal-group: 3;
    box-ordinal-group: 3;
}
0
source

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


All Articles