Forum Moderators: not2easy
.home-blocks {
display: table;
color: #333;
margin-bottom: 100px;
}
.home-blocks .hbrow {
display: table-row;
}
.home-blocks .hbcell {
display: table-cell;
width: 50%;
background-color: #ebebeb;
vertical-align: middle;
text-align: center;
}
.hbcell .blockcontent {
width: 80%;
margin: 0 auto;
}
.hbcell h2 {
text-transform: uppercase;
}
.hbcell p {
font-size: 20px;
line-height: 30px;
}
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
.wrap {
max-width:1200px;
width:100%;
margin:auto;
display:table;
table-layout:fixed;
}
.cell {
display:table-cell;
vertical-align:middle;
background:#f9f9f9;
text-align:center;
}
.tr {
display:table-row;
}
img {
max-width:100%;
height:auto;
}
@media screen and (max-width:600px){
.wrap{display:block}
.tr{display:flex;flex-wrap:wrap}
.cell{flex: 1 100%;margin:0 0 20px}
.even .cell:last-child{order:-1}
}
</style>
</head>
<body>
<div class="wrap">
<div class="tr">
<div class="cell"><img src="http://placehold.it/600x600"></div>
<div class="cell">Some text here</div>
</div>
<div class="tr even">
<div class="cell">Some text here</div>
<div class="cell"><img src="http://placehold.it/600x600"></div>
</div>
<div class="tr">
<div class="cell"><img src="http://placehold.it/600x600"></div>
<div class="cell">Some text here</div>
</div>
<div class="tr even">
<div class="cell">Some text here</div>
<div class="cell"><img src="http://placehold.it/600x600"></div>
</div>
</div>
</body>
</html>
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Untitled Document</title>
<style>
.wrap {
max-width: 1200px;
width: 100%;
margin: auto;
display: table;
table-layout: fixed;
}
.tr > div {
display: table-cell;
vertical-align: middle;
background: #f9f9f9;
text-align: center;
}
.tr {
display: table-row;
}
img {
max-width: 100%;
height: auto;
display: block;
}
@media screen and (max-width:600px) {
.wrap {
display: block
}
.tr {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap
}
.tr > div {
display:block;
-webkit-box-flex: 1;
-webkit-flex: 1 100%;
-ms-flex: 1 100%;
flex: 1 100%;
margin: 0 0 20px
}
.tr:nth-child(even) > div:last-child {
-webkit-box-ordinal-group: 0;
-webkit-order: -1;
-ms-flex-order: -1;
order: -1
}
}
</style>
</head>
<body>
<div class="wrap">
<div class="tr">
<div><img src="http://placehold.it/600x600"></div>
<div>Some text here</div>
</div>
<div class="tr">
<div>Some text here</div>
<div><img src="http://placehold.it/600x600"></div>
</div>
<div class="tr">
<div><img src="http://placehold.it/600x600"></div>
<div>Some text here</div>
</div>
<div class="tr">
<div>Some text here</div>
<div><img src="http://placehold.it/600x600"></div>
</div>
</div>
</body>
</html>