css - How do you centre a group of divs inside a containing div? -


i have group of columns need centred inside container div background colour of #eeeff3 when zoom out columns stay same size , centred , grey background stays 100% width.click link see current html , css! jsfiddle

can shed light on situation?

jsfiddle links require code 

remove float:left , add display:inline-block.

see updated jsfiddle

.container{      margin:0 auto;      background: #eeeff3;      width:100%;      height:400px;      text-align:center; } .col4{     width:270px;     height:400px;     border-right:2px solid white;     display:inline-block; } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -