javascript - Responsive Divs -


i need 3 or 4 column responsive div system. reading question here found this snippet:

html:

<div class="core">  <div class="box">   <div class="text">text</div>  </div>  <div class="box">   <div class="text">text</div>  </div>  <div class="box">   <div class="text">text</div>  </div> </div> 

css:

.core {width: 100%; display: table; border-spacing: 10px;}  .box{     background-color: coral;     width: 32.03125%;      float:none;     display: table-cell;     border-radius:5px; } .text{     padding: 10px;     color:white;     font-weight:bold;     text-align:center; } 

which need , have. problem when gets smaller want blocks down, paragraph.

instead of this:

enter image description here

i want this:

enter image description here

try css:

.core {width: 100%; display: table; border-spacing: 10px;}  .box{     background-color: coral;     width: 100%;      float:none;     display: table-row;     border-radius:5px; } .text{     padding: 10px;     color:white;     font-weight:bold;     text-align:center; } 

the problem when get's smaller want blocks down

this link found not using responsive frameworks. it's simple css + html


Comments