I have some div on the page. How can I make DIVs create a new column on the right when the bottom of the page is reached. Therefore, I have small fixed DIV heights with images inside them. After each DIV there is a line, and then the next div, etc. On smaller displays, the screen requires scrolling to view the DIV. So I added overflow: hiddento the body to disable scrolling. Now the DIVs at the bottom are cut out, so I want the DIV cut out to create a new column on the right.
Example
.
body {
overflow: hidden;}
#icon {
background: #000;
color:#fff;
height:50px;
width:50px;
}
<body>
<div id=icon>1</div><br>
<div id=icon>2</div><br>
<div id=icon>3</div><br>
<div id=icon>4</div><br>
<div id=icon>5</div><br>
<div id=icon>6</div><br>
<div id=icon>7</div><br>
<div id=icon>8</div><br>
<div id=icon>9</div>
Run codeHide result
source
share