I have 4 columns in a row that become 1 column on mobile. The way this looks on mobile is fine, but I want to center the content in divs 2 and 4 in each row. What would be the best way to do this?
Apparently my edit was deleted or the site messed up, but I had said I want to do this vertical and horizontal. However, it was my fault I forgot to link to the page. Sorry, guys. - http://www.dismantledesign.com/testsite2/clients.html
Edit: I appreciate all the answers, but I don't think anyone understands that this div has no set height. I just want that text and icons to stay centered as the screen moves. The flex didn't seem to work because it required setting a height to the div.
I also simplified my HTML
Code
.clientsdetail {
text-align: center;
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
.clientinfo h3 {
padding-top: 10px;;
}
.clientinfo p {
padding: 0px 30px;
font-size: 15px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-md-3 nopadding">
<img class="img-responsive" src="img/clients/ivey.jpg">
</div>
<div class="col-md-3 nopadding cinfo">
<div class="clientinfo text-center">
<h3>IVEY</h3>
<p>Clarksville, TN</p>
<div class="social-icons-clients">
<a href="#"><span class="icon-sprite sprite-ig"> </span></a>
<a href="#"><span class="icon-sprite sprite-fb"> </span></a>
<a href="#"><span class="icon-sprite sprite-gp"> </span></a>
<a href="#"><span class="icon-sprite sprite-sc"> </span></a>
<a href="https://twitter.com/contracoda" target="_blank"><span class="icon-sprite sprite-tw"> </span></a>
</div>
</div>
</div>
<div class="col-md-3 nopadding cinfo">
<img class="img-responsive" src="img/clients/rufus.jpg">
</div>
<div class="col-md-3 nopadding">
<div class="clientinfo text-center">
<h3>RUFUS DAWKINS</h3>
<p>Clarksville, TN</p>
<div class="social-icons-clients">
<a href="#"><span class="icon-sprite sprite-ig"> </span></a>
<a href="#"><span class="icon-sprite sprite-fb"> </span></a>
<a href="#"><span class="icon-sprite sprite-gp"> </span></a>
<a href="#"><span class="icon-sprite sprite-sc"> </span></a>
<a href="https://twitter.com/contracoda" target="_blank"><span class="icon-sprite sprite-tw"> </span></a>
</div>
</div>
</div>
</div>