center row content in bootstrap grid - css

I know this question has been asked a lot but each one seems to be a bit unique and I have tried at least 7 different versions here on StackOverflow and none have worked.
It should be a simple fix but I can't center the div contents. I need all the rows centered to the gird and centered when scaled all the way down to the mobile view.
Here is my code example:
http://codepen.io/anon/pen/aOBJEv
Here is the html:
<div class="row-fluid">
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6"><img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/image-333x333.jpg" class="img-btm">
<div class="top"> <img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png"> </div>
<div class="topic text-center">cheese </div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6"><img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/Ed-Vizenor-150x150.jpg" class="img-btm">
<div class="top"> <img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png"> </div>
<div class="topic text-center">Cool Beans </div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6"><img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/BeauBird-150x150.png" class="img-btm">
<div class="top"> <img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png"> </div>
<div class="topic text-center">I am happy </div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6"><img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/ave4-150x150.jpg" class="img-btm">
<div class="top"> <img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png"> </div>
<div class="topic text-center">Hello world! </div>
</div>
</div>

I have added the .row-fluid{...} and div.bottom{...} code blocks to your existing CSS.
.row-fluid {
text-align: center;
}
div.bottom {
display: inline-block;
float: none;
text-align: left;
}
.top {
position: absolute;
top: -5px;
left: 0px;
}
.topic {} .bottom {
position: relative;
top: 0px;
left: 0px;
margin-bottom: 25px;
max-width: 275px;
min-width: 277px;
}
.img-btm {
height: 233px;
width: 228px;
-webkit-border-radius: 233px;
-moz-border-radius: 233px;
border-radius: 233px;
}
.bottom .text-center {
max-width: 275px;
min-width: 277px;
position: absolute;
left: -10px;
top: 18px;
font-size: 18px;
color: white;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
<div class="row-fluid">
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6">
<img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/image-333x333.jpg" class="img-btm">
<div class="top">
<img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png">
</div>
<div class="topic text-center">cheese</div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6">
<img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/Ed-Vizenor-150x150.jpg" class="img-btm">
<div class="top">
<img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png">
</div>
<div class="topic text-center">Cool Beans</div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6">
<img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/BeauBird-150x150.png" class="img-btm">
<div class="top">
<img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png">
</div>
<div class="topic text-center">I am happy</div>
</div>
<div class="bottom col-xs-12 col-sm-12 col-md-6 col-lg-6">
<img src="http://edvizenor.com/2015/wordpress/wp-content/uploads/2015/05/ave4-150x150.jpg" class="img-btm">
<div class="top">
<img src="http://www.edvizenor.com/2015/images/TopicCircleBlue.png">
</div>
<div class="topic text-center">Hello world!</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
source: Bootstrap 3 responsive centered columns
Source has no explanation for the code, so
The class .row-fluid has a text-align:center property which makes its contents centered.
Under div.bottom I have the display:inline-block property which is necessary for its parents text-align property to work; float:none overrides the default float:left and text-align:left is a fix for center positioning the image inside the column div, because there was some padding to the element.

Related

CSS how to align different size images with text inside row?

Need to align four different height (beetween 160-180px) svg images with text under them.
Images should be placed in line at sight and I don't know how to make strict align short text under them in one line like on screenshot.
Thanks!
UPD: Sorry for inconvinient information, thought that this question is quite typical for those who know css good.
Here is my html and css. Also I'm using bootstrap rows.
<div class="did-you-know">
<div class="row items">
<div class="col-lg-3 col-xs-6">
<div class="icon">
<img src="/img/mswa/inline-wa.svg"/>
</div>
<div class="title text-poppins">
<p>We’re from WA</p>
<p>{like you!}</p>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="icon">
<img src="/img/mswa/inline-packaging.svg"/>
</div>
<div class="title text-poppins">
<p>We use minimal packaging</p>
<p>{great for the planet}</p></div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="icon">
<img src="/img/mswa/inline-quality.svg"/>
</div>
<div class="title text-poppins">
<p>We only choose quality</p>
<p>{better for your health}</p></div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="icon">
<img src="/img/mswa/inline-community.svg"/>
</div>
<div class="title text-poppins">
<p>We love giving back</p>
<p>{great for our community}</p></div>
</div>
</div>
</div>
.did-you-know {
padding: 20px;
text-align: center;
}
.did-you-know .items .icon {
padding: 50px;
}
.did-you-know .items .title {
font-size: 20px;
}
here is a solution:
Replace images by your images.
<!DOCTYPE html>
<html>
<head>
<style>
* {
box-sizing: border-box;
}
.column {
float: left;
width: 25%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
</style>
</head>
<body>
<div class="row">
<div class="column">
<img src="https://freesvg.org/img/cartoonsun.png" alt="Snow" style="width:100%">
<p style='text-align: center;'>test1</p>
</div>
<div class="column">
<img src="https://freesvg.org/img/cartoonsun.png" alt="Forest" style="width:100%">
<p style='text-align: center;'>test2</p>
</div>
<div class="column">
<img src="https://freesvg.org/img/cartoonsun.png" alt="Mountains" style="width:100%">
<p style='text-align: center;'>test3</p>
</div>
<div class="column">
<img src="https://freesvg.org/img/cartoonsun.png" alt="Mountains" style="width:100%">
<p style='text-align: center;'>test3</p>
</div>
</div>
</body>
</html>

How to get div's centered next to each other in this Bootstrap 3 grid?

I have 6 divs, each of which has a specific width in number of pixels. Using Bootstrap 3 I would like to have a maximum of 3 boxes on one row/line. As the screen gets smaller it should move to 2 divs on one line, and when it gets smaller even more just 1 div on a row. How can I do this?
I expected the code below to achieve this.
However, the divs displayed on one row unfortunately are not centered. How to center these divs?
.mainDiv {
margin: 0 auto;
}
.specificWidthInNumberOfPixels {
border: 14px solid #dd5;
width: 160px;
height: 160px;
padding: 15px;
text-align: center;
margin: 5px;
}
.float {
float: left;
display: table;
margin: auto;
}
<div class="mainDiv container-fluid">
<div class="col-xs-12 col-sm-12" style="">
<p style="text-align: center;">Header</p>
</div>
<div class="row" style="max-width: 700px; float: none; display: table; margin: auto; background-color: #000;">
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4 float">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
</div>
</div>
Update: In response to this answer: so the answer now produces the visual at the top, but instead what I'm looking for is the visual at the bottom:
If you can use CSS Grid, you're in good shape. Look on codepen to preview it, the code snippet seems like it's acting up:
https://codepen.io/tobyinternet/pen/bGdoBEr
.mainDiv {
margin: 0 auto;
width: 100%;
text-align: center;
}
.row-grid:before, .row-grid:after {
display: none;
}
.row-grid {
margin: 0 auto;
width:100%;
max-width: 500px;
display: grid !important;
grid-template-columns: repeat(auto-fit,160px);
column-gap: 10px;
row-gap: 10px;
justify-content: center;
}
.specificWidthInNumberOfPixels {
border: 14px solid #dd5;
width: 160px;
height: 160px;
padding: 15px;
text-align: center;
}
p {
color: white;
}
<div class="mainDiv container-fluid">
<div class="col-xs-12 col-sm-12" style="">
<p style="text-align: center;">Header</p>
</div>
<div class="row row-grid" style="background-color: #000;">
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
</div>
</div>
You're supposed to wrap them in a container-fluid or container class with a row child element, like so:
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 col-sm-4">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
<div class="col-xs-6 col-sm-4">
<div class="specificWidthInNumberOfPixels">
<p>Text</p>
</div>
</div>
</div>
</div>
This will display 1 row of 3 columns. Add a second row within the container div with the same 3 columns to display a second row of 3 columns

Full height div in Bootstrap 4 columns

I would like to have all my .element at the same height and the image vertical align middle if it's too small to be full size.
I tried so many things but I can't find the solution
.element {
border: 10px solid #e6e6e6;
margin-bottom: 20px;
}
.element .inner {
padding: 15px;
}
.element .inner p {
margin-bottom: 5px;
text-align: center;
}
.element a {
background-color: #424753;
color: #fff;
display: block;
height: 30px;
padding-top: 3px;
text-align: center;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.gimmesomeoven.com/wp-content/uploads/2015/08/How-To-Make-Crepes-5.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
</div>
You can add display: flex, flex-direction: column and flex: 1 on element, inner and col-3. To make img centered you can use margin-top and margin-bottom auto.
.col-3,
.element,
.inner {
display: flex;
flex-direction: column;
flex: 1;
}
.element {
border: 10px solid #e6e6e6;
margin-bottom: 20px;
}
.element .inner {
padding: 15px;
}
.element .inner p {
margin-bottom: 5px;
text-align: center;
}
.element a {
background-color: #424753;
color: #fff;
display: block;
height: 30px;
padding-top: 3px;
text-align: center;
}
.element img {
margin-top: auto;
margin-bottom: auto;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.gimmesomeoven.com/wp-content/uploads/2015/08/How-To-Make-Crepes-5.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
</div>
You can use the new Bootstrap 4 flexbox utilities and reduce all the extra CSS..
http://www.codeply.com/go/LBkyWJzTrT
<div class="row">
<div class="col-3">
<div class="element d-flex h-100 flex-wrap justify-content-between">
<div class="inner d-flex flex-wrap align-self-center justify-content-center">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg">
<p>Some text</p>
</div>
<a href class="align-self-end w-100">Link</a>
</div>
</div>
<div class="col-3">
<div class="element d-flex h-100 flex-wrap justify-content-between">
<div class="inner d-flex flex-wrap align-self-center justify-content-center">
<img class="img-fluid" src="http://www.gimmesomeoven.com/wp-content/uploads/2015/08/How-To-Make-Crepes-5.jpg">
<p>Some text</p>
</div>
<a href class="align-self-end w-100">Link</a>
</div>
</div>
<div class="col-3">
<div class="element d-flex h-100 flex-wrap justify-content-between">
<div class="inner d-flex flex-wrap align-self-center justify-content-center">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg">
<p>Some text</p>
</div>
<a href class="align-self-end w-100">Link</a>
</div>
</div>
<div class="col-3 align-items-center">
<div class="element d-flex h-100 flex-wrap justify-content-between">
<div class="inner d-flex flex-wrap align-self-center justify-content-center">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg">
<p>Some text</p>
</div>
<a href class="align-self-end w-100">Link</a>
</div>
</div>
</div>
http://www.codeply.com/go/LBkyWJzTrT
Do you want like this, just added position styling. But with this you also have to write media-query styling.
.element {
border: 10px solid #e6e6e6;
margin-bottom: 20px;
height: 225px;
position: relative;
}
.element .inner {
padding: 15px;
}
.element .inner p {
margin-bottom: 5px;
text-align: center;
}
.element a {
background-color: #424753;
color: #fff;
display: block;
height: 30px;
padding-top: 3px;
text-align: center;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.gimmesomeoven.com/wp-content/uploads/2015/08/How-To-Make-Crepes-5.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
<div class="col-3">
<div class="element">
<div class="inner">
<img class="img-fluid" src="http://www.comohacercrepes.com//ImagenesComoHacerCrepes/ImagenesCrepes/receta-crepes-masa-thermomix.jpg" />
<p>Some text</p>
</div>
<a>Link</a>
</div>
</div>
</div>

Center Div scroll

In my code,
Within one container Three blocks will be there. one freezes on the left and one freezes on the right and the other will scroll in between these two divs. Just like modern grids. But I don't want to use the grid.
I have tried, but the center block is not getting the Horizontal scroll.
I want no breakage of the center block, instead, it should scroll horizontally.
* {
box-sizing: border-box;
}
.container {
width: 100%;
overflow: auto;
white-space: nowrap
}
.scroll-center {
width: auto;
overflow: auto;
display: block;
white-space: nowrap
}
.row {
float: left;
}
.cell {
padding: 3px;
border: 1px solid #bbb;
min-height: 25px;
min-width: 200px;
}
<div class="container">
<div class="row">
<div class="cell">HeaderL1</div>
<div class="cell">HeaderL2</div>
<div class="cell">HeaderL3</div>
</div>
<div class="scroll-center">
<div class="row">
<div class="cell">HeaderT2</div>
<div class="cell">Data21</div>
<div class="cell">Data22</div>
</div>
<div class="row">
<div class="cell">HeaderT3</div>
<div class="cell">Data31</div>
<div class="cell">Data32</div>
</div>
<div class="row">
<div class="cell">HeaderT4</div>
<div class="cell">Data41</div>
<div class="cell">Data42</div>
</div>
<div class="row">
<div class="cell">HeaderT5</div>
<div class="cell">Data51</div>
<div class="cell">Data52</div>
</div>
<div class="row">
<div class="cell">HeaderT6</div>
<div class="cell">Data61</div>
<div class="cell">Data62</div>
</div>
<div class="row">
<div class="cell">HeaderT7</div>
<div class="cell">Data71</div>
<div class="cell">Data72</div>
</div>
<div class="row">
<div class="cell">HeaderT8</div>
<div class="cell">Data81</div>
<div class="cell">Data82</div>
</div>
<div class="row">
<div class="cell">HeaderT9</div>
<div class="cell">Data91</div>
<div class="cell">Data92</div>
</div>
</div>
<div class="right">
<div class="row">
<div class="cell">HeaderTR</div>
<div class="cell">DataR1</div>
<div class="cell">DataR2</div>
</div>
</div>
</div>
You probably need to add width to your container. Right now it's set to 100% so it will not size beyond the browser window. Instead you could do something like this:
.container {
overflow: auto;
white-space: nowrap;
width:2000px;
}
I realize that you may need to change this value dynamically but hopefully this gets you started
Example:http://codepen.io/nilestanner/pen/jAjbdK
Try with For example:
css:
* {
box-sizing: border-box;
}
.left, .center, .right{
float:left
}
.center {
width:400px;
overflow: scroll;
display: block;
white-space: nowrap
}
#center-scroll{
width:2000px;
}
.center .row{
display:inline-block;
width:33%;
}
.center .row .cell{
min-width:100%;
}
.row{
float:left;
}
.cell {
padding: 3px;
border: 1px solid #bbb;
min-height: 25px;
min-width: 200px;
}
HTML
<div class="container">
<div class="left">
<div class="row" >
<div class="cell">HeaderL1</div>
<div class="cell">HeaderL2</div>
<div class="cell">HeaderL3</div>
</div>
</div>
<div class="center">
<div id="center-scroll">
<div class="row">
<div class="cell">HeaderT2</div>
<div class="cell">Data21</div>
<div class="cell">Data22</div>
</div>
<div class="row">
<div class="cell">HeaderT3</div>
<div class="cell">Data31</div>
<div class="cell">Data32</div>
</div>
<div class="row">
<div class="cell">HeaderT4</div>
<div class="cell">Data41</div>
<div class="cell">Data42</div>
</div>
<div class="row">
<div class="cell">HeaderT5</div>
<div class="cell">Data51</div>
<div class="cell">Data52</div>
</div>
<div class="row">
<div class="cell">HeaderT6</div>
<div class="cell">Data61</div>
<div class="cell">Data62</div>
</div>
<div class="row">
<div class="cell">HeaderT7</div>
<div class="cell">Data71</div>
<div class="cell">Data72</div>
</div>
<div class="row">
<div class="cell">HeaderT8</div>
<div class="cell">Data81</div>
<div class="cell">Data82</div>
</div>
<div class="row">
<div class="cell">HeaderT9</div>
<div class="cell">Data91</div>
<div class="cell">Data92</div>
</div>
</div>
</div>
<div class="right">
<div class="row">
<div class="cell">HeaderTR</div>
<div class="cell">DataR1</div>
<div class="cell">DataR2</div>
</div>
</div>
</div>

Vertically center text in container

I have a jsfiddle here - http://jsfiddle.net/gomwyt2j/1/
Super simple, I just need to center the text vertically so it lines up with the button
Nothing I try seems to work
<div class="container">
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-3 text-center text"><p>Some Info</p></div>
<div class="col-sm-4 text-center text"><p>Some more Info Her</p></div>
<div class="col-sm-3 text-center btn-btn"><a class="btn">Read More</a></div>
<div class="col-sm-1"></div>
</div>
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-3 text-center text"><p>Some Info</p></div>
<div class="col-sm-4 text-center text"><p>Some more Info Her</p></div>
<div class="col-sm-3 text-center"><a class="btn">Read More</a></div>
<div class="col-sm-1"></div>
</div>
</div>
One possible solution is to use line: height:
html
<div class="container">
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-3 text-center text">
<p>Some Info</p>
</div>
<div class="col-sm-4 text-center text">
<p>Some more Info Her</p>
</div>
<div class="col-sm-3 text-center btn-btn"><a class="btn">Read More</a>
</div>
<div class="col-sm-1"></div>
</div>
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-3 text-center text">
<p>Some Info</p>
</div>
<div class="col-sm-4 text-center text">
<p>Some more Info Her</p>
</div>
<div class="col-sm-3 text-center"><a class="btn">Read More</a>
</div>
<div class="col-sm-1"></div>
</div>
</div>
css
.row {
background: gray;
color: white;
padding: 5px 0;
margin: 0 0 10px 0;
}
.text p {
display: inline-block;
//padding: 9px 0 0 0;
vertical-align: middle;
}
.btn-btn {
}
.btn {
background: red;
color: white;
padding-top: 10px;
padding-bottom: 10px;
vertical-align: middle;
}
.col-sm-3, .col-sm-4 {
line-height: 35px; /*add line height*/
}
p {
margin: 0;/*remove margin from p*/
}
fiddle

Resources