html - 3 Column setup CSS problems -


hello trying setup 3 three columns using code below

<div class="col1"></div> <div class="col2"></div> <div class="col3"></div>  **css**  .col1 {     background-color: #ddf;     float: left;     }     .col2 {     background-color: #dfd;     float: none;     }     .col3 {     background-color: #fdd;     float: right; } 

but cannot working if take http://paycoinfaucet.cf/test/ see last column doesn't align other two

thanks help

setting every div inline-block 33% of width, divs resize page.

.col1 {     display: inline-block;      width: 33%;        background-color: #ddf; } .col2 {     display: inline-block;      width: 33%;      background-color: #dfd; } .col3 {     display: inline-block;      width: 33%;      background-color: #fdd; } 

i suggest take @ bootstrap rows

<row>  <div class="col1 col-md-4"></div>  <div class="col2 col-md-4"></div>  <div class="col3 col-md-4"></div> </row> 

this solution doesn't require additional css, , can customize size of divs according size of screen.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -