I made some cards and i want to center the button. The only thing is, whatever I do the button stays at the start. And when i display the button as a flex or a block, it expands to full width. Can someone help me out?
The H3 does perfectly align in the center. I can't figure out why the button stays at exactly the same spot.
.index-cards .container {
display: flex;
justify-content: center;
align-items: center;
}
.index-cards .card {
padding: 0;
margin: 10px;
border-radius: 10px;
}
.index-cards .card-image {
height: 240px;
background-size: cover;
border-radius: 10px;
}
.index-cards .card-1 {
background-image: url(https://via.placeholder.com/500&text=1);
}
.index-cards .card-2 {
background-image: url(https://via.placeholder.com/500&text=2);
}
.index-cards .card-3 {
background-image: url(https://via.placeholder.com/500&text=3);
}
.index-cards p {
margin: 0 15px;
}
.index-cards h3,
.index-cards a {
text-align: center;
}
<section class="index-cards my-150px">
<div class="container">
<div class="card">
<div class="card-image card-1"></div>
<h3 class="my-30px">Sportscholen</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
Sportschool zoeken
</div>
<div class="card">
<div class="card-image card-2"></div>
<h3 class="my-30px">Nieuw bij FP30</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
Eerste keer
</div>
<div class="card">
<div class="card-image card-3"></div>
<h3 class="my-30px">Contact</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
Contact opnemen
</div>
</div>
</section>
I created a new class text-center and wrapped the <a> inside this new div. The reason the heading was centering but not the anchor. Because on heading is CSS display: block; is applied by default and taking the full width.
.index-cards .container {
display: flex;
justify-content: center;
align-items: center;
}
.index-cards .card {
padding: 0;
margin: 10px;
border-radius: 10px;
}
.index-cards .card-image {
height: 240px;
background-size: cover;
border-radius: 10px;
}
.index-cards .card-1 {
background-image: url(https://via.placeholder.com/500&text=1);
}
.index-cards .card-2 {
background-image: url(https://via.placeholder.com/500&text=2);
}
.index-cards .card-3 {
background-image: url(https://via.placeholder.com/500&text=3);
}
.index-cards p {
margin: 0 15px;
}
.index-cards h3,
.index-cards a {
text-align: center;
}
.text-center{
text-align: center;
}
<section class="index-cards my-150px">
<div class="container">
<div class="card">
<div class="card-image card-1"></div>
<h3 class="my-30px">Sportscholen</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
<div class="text-center">Sportschool zoeken</div>
</div>
<div class="card">
<div class="card-image card-2"></div>
<h3 class="my-30px">Nieuw bij FP30</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
<div class="text-center">Eerste keer</div>
</div>
<div class="card">
<div class="card-image card-3"></div>
<h3 class="my-30px">Contact</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aperiam, dignissimos! Autem fugit perspiciatis incidunt nulla expedita quaerat cupiditate neque iure!</p>
<div class="text-center">Contact opnemen</div>
</div>
</div>
</section>
Remove the .index-cards a add separately
.index-cards h3,
.index-cards a {
text-align: center;
}
Add This:
.index-cards a {
text-align: center;
display: block;
}
Related
I have box elements in a flex container. I want the paragraph in a box to display when hovering over the box. However, the hovered box makes the other boxes grow too. Is there a way to avoid affecting the other boxes when hovering one box?
I would try: align-items:flex-start, but I want the boxes to be equivalent in height when they are not hovered.
So align-items:flex-start does not keep the boxes' height equivalent when they are not hovered.
I want the box to enlarge when hovered without affecting the other boxes and turn back to the equivalent height when not hovered.
Codepen link: https://codepen.io/lemour-sudo/pen/yLMQOpE
.container > * {
width: 25em;
padding: 1em;
text-align: center;
}
.container {
display: flex;
justify-content: space-around;
margin: 3em 10em;
border: solid 3px green;
}
p {
display: none;
}
.box {
border: solid 3px red;
}
.box:hover p {
display: block;
}
<div class="container">
<div class="box">
<h1>Box 1</h1>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nam tenetur amet dignissimos, accusantium molestias tempora!
</p>
</div>
<div class="box">
<h1>Box 2</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto voluptatum labore totam natus illo, magni inventore cupiditate hic omnis ipsam vero nobis enim dicta perferendis facilis tenetur quaerat! Voluptas, voluptatum.
</p>
</div>
</div>
I'm not sure exactly how to do what you want but I think this way is better. It's more customizable. I agree with vals answer but If you don't want to make the container to grow all the way down this way is better.
* {
margin: 0;
padding: 0;
box-sizing:border-box;
}
.con {
width: 90%;
display: flex;
align-items: center;
justify-content: space-around;
border: 3px solid black;
}
.item {
border: 3px solid red;
width: 200px;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background-color: cadetblue;
}
.text-con {
position: absolute;
width: 100%;
top: 100%;
display: none;
background-color: cadetblue;
}
.item:hover .text-con {
display: block;
}
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='style.css'>
</head>
<body>
<div class="con">
<div class="item">
<h1>box1</h1>
<div class="text-con">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis minus consequatur similique quas excepturi dignissimos optio nulla possimus</p>
</div>
</div>
<div class="item">
<h1>box2</h1>
<div class="text-con">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis minus consequatur similique quas excepturi dignissimos optio nulla possimus</p>
</div>
</div>
<div class="item">
<h1>box3</h1>
<div class="text-con">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis minus consequatur similique quas excepturi dignissimos optio nulla possimus</p>
</div>
</div>
</div>
</body>
</html>
May be setting flex-start on hover of the container?
.container > * {
width: 25em;
padding: 1em;
text-align: center;
}
.container {
display: flex;
justify-content: space-around;
margin: 3em 10em;
border: solid 3px green;
}
.container:hover {
align-items: flex-start;
}
p {
display: none;
}
.box {
border: solid 3px red;
}
.box:hover p {
display: block;
}
<div class="container">
<div class="box">
<h1>Box 1</h1>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nam tenetur amet dignissimos, accusantium molestias tempora!
</p>
</div>
<div class="box">
<h1>Box 2 bigger than 1</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto voluptatum labore totam natus illo, magni inventore cupiditate hic omnis ipsam vero nobis enim dicta perferendis facilis tenetur quaerat! Voluptas, voluptatum.
</p>
</div>
</div>
Another solution, with different heights in the initial state
.container > * {
width: 25em;
padding: 1em;
text-align: center;
}
.container {
display: flex;
justify-content: space-around;
margin: 3em 10em;
border: solid 3px green;
}
.container:hover {
align-items: flex-start;
}
p {
display: none;
}
.box {
border: solid 3px red;
height: fit-content;
}
.box:hover p {
display: block;
}
<div class="container">
<div class="box">
<h1>Box 1</h1>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nam tenetur amet dignissimos, accusantium molestias tempora!
</p>
</div>
<div class="box">
<h1>Box 2 bigger than 1</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto voluptatum labore totam natus illo, magni inventore cupiditate hic omnis ipsam vero nobis enim dicta perferendis facilis tenetur quaerat! Voluptas, voluptatum.
</p>
</div>
</div>
body{
margin: 0;
padding: 0;
}
.bg-color{
background: linear-gradient(180deg, #BA894D 0%, #FFBC6A 100%);
}
.main-content{
display: flex;
justify-content: center;
align-items: center;
}
.main-content div{
max-width: 595px;
margin-bottom: 100px;
text-align: center;
}
<div class="container-fluid">
<div class="row">
<div class="col-lg-5 bg-color">
<div class="main-content">
<div>
<img src="./download.jpeg" alt="LOGO" class="img-fluid">
<h5>Brand Name</h5>
<h3>Build your own shop</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque inventore perferendis sit optio vero totam voluptatibus alias expedita, in neque natus, rerum officia nobis nihil, sapiente maxime beatae porro perspiciatis.</p>
</div>
</div>
</div>
<div class="col-lg-7">
<h1>CONTACT US</h1>
</div>
</div>
</div>
It is a contact form with 2 columns, One side is logo and text with the background of full height and one side is formed with inputs like name, email I want to center the logo and text below vertically and horizontally with a background color of 100% height.
body{
margin: 0;
padding: 0;
}
.contact{
min-height: 100vh;
}
.bg-color{
background: linear-gradient(180deg, #BA894D 0%, #FFBC6A 100%);
}
.main-content{
display: flex;
justify-content: center;
align-items: center;
}
.main-content div{
max-width: 595px;
text-align: center;
}
<div class="container-fluid">
<div class="row contact">
<div class="col-lg-5 bg-color main-content">
<div>
<img src="./download.jpeg" alt="" class="img-fluid">
<h5>Brand Name</h5>
<h3>Build your own shop</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque inventore perferendis sit optio vero totam voluptatibus alias expedita, in neque natus, rerum officia nobis nihil, sapiente maxime beatae porro perspiciatis.</p>
</div>
</div>
<div class="col-lg-7">
<h1>CONTACT US</h1>
</div>
</div>
</div>
I think this is what you are expecting.
I have a left navbar that has a height of 100% but when there's any overflow the 100% height doesn't work.
I tried giving body and html height of 100% and min-height of 100%. I also tried giving the menu min-height: 100% and 100vh height. I read a lot of StackOverflow questions but none of the solutions worked for me.
Here's the code: Or codepen: shorturl.at/dgvFL
body {
width: 100vw;
height: 100vh;
font-family: fontReg;
overflow-x: hidden;
margin: 0;
font-family: Arial
}
.nav-bar {
min-height: 100vh;
width: 30%;
background-color: rgba(246, 245, 243, 1);
float: left;
overflow: auto;
}
.nav-bar ul {
display: flex;
flex-direction: column;
list-style-type: none;
padding: 5%;
}
.t2 {
margin-bottom: 1000px;
background-color: #dddddd;
float: right;
width: 200px;
height: 200px;
}
.nav-bar ul li {
margin: calc(100vh * .01);
}
.services {
display: flex;
flex-direction: column;
}
.service {
width: 50%;
margin: 20px auto;
background-color: rgba(246, 245, 243, 1);
box-shadow: 2px 2px 2px 2px rgba(240, 131, 0, 1);
padding: 10px;
transition: 1s;
}
.service h1 {
color: orange;
font-size: calc(100vw * .05);
margin-top: 0;
}
a:link,
a:visited,
a:active {
text-decoration: none;
color: inherit;
}
<div class="nav-bar">
<ul>
<li>Home</li>
<li> All Blogs </li>
<li>About & Contact
<li>Create A Blog</li>
</ul>
</div>
<div class="services">
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse
voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse
voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse
voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse
voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
</div>
Use position: fixed if you want to fix navbar position.
body {
width: 100vw;
height: 100vh;
font-family: fontReg;
overflow-x: hidden;
margin: 0;
font-family: Arial;
}
.nav-bar {
position: fixed;
left: 0;
top: 0;
bottom: 0;
min-height: 100vh;
width: 30%;
background-color: rgba(246, 245, 243, 1);
float: left;
overflow: auto;
}
.nav-bar ul {
display: flex;
flex-direction: column;
list-style-type: none;
padding: 5%;
}
.t2 {
margin-bottom: 1000px;
background-color: #dddddd;
float: right;
width: 200px;
height: 200px;
}
.nav-bar ul li {
margin: calc(100vh * .01);
}
.services {
margin-left: 30%;
display: flex;
flex-direction: column;
}
.service {
width: 50%;
margin: 20px auto;
background-color: rgba(246, 245, 243, 1);
box-shadow: 2px 2px 2px 2px rgba(240, 131, 0, 1);
padding: 10px;
transition: 1s;
}
.service h1 {
color: orange;
font-size: calc(100vw * .05);
margin-top: 0;
}
a:link,
a:visited,
a:active {
text-decoration: none;
color: inherit;
}
<div class="nav-bar">
<ul>
<li>Home</li>
<li> All Blogs </li>
<li>About & Contact
<li>Create A Blog</li>
</ul>
</div>
<div class="services">
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
<div class="service">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo, obcaecati rem. Numquam non quas sapiente esse voluptates voluptatibus, est voluptas amet deleniti vel temporibus minima rem corporis nisi expedita provident!
</p>
</div>
</div>
When I hover the content, I only want the image to be displayed and the content/text hidden. My code shows here that when I hover the content, the image is visible but the content is also displayed. I tried searching for solutions for this problem but
unfortunately, I didn't see any similar problems like this one.
.section-four {
display: flex;
justify-content: center;
height: 100vh;
}
.menu-one {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
}
.menu-content {
position: absolute;
width: 100%;
}
.menu-one:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
max-height: 100%;
background-repeat: no-repeat;
}
.menu-two {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
left: 5em;
}
.menu-two:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
background-repeat: no-repeat;
max-height: 100%;
}
<section class="section-four">
<div class="menu-one">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
<div class="menu-two">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
</section>
You can hide the content with:
.menu-one:hover > div.menu-content,
.menu-two:hover > div.menu-content {
display: none;
}
Example:
.section-four {
display: flex;
justify-content: center;
height: 100vh;
}
.menu-one {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
}
.menu-content {
position: absolute;
width: 100%;
}
.menu-one:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
max-height: 100%;
background-repeat: no-repeat;
}
.menu-two {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
left: 5em;
}
.menu-two:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
background-repeat: no-repeat;
max-height: 100%;
}
.menu-one:hover>div.menu-content,
.menu-two:hover>div.menu-content {
display: none;
}
<section class="section-four">
<div class="menu-one">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
<div class="menu-two">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
</section>
add a child selector to the :hover stated and hide it as you please
.section-four {
display: flex;
justify-content: center;
height: 100vh;
}
.menu-one {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
}
.menu-content {
position: absolute;
width: 100%;
}
.menu-one:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
max-height: 100%;
background-repeat: no-repeat;
}
.menu-one:hover > .menu-content{
opacity:0; transition:opacity 500ms ease;
}
.menu-two {
position: relative;
margin-top: 2em;
width: 25%;
height: 50%;
left: 5em;
}
.menu-two:hover {
background: url(https://images.unsplash.com/photo-1468769458611-1c88091fcd94?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=450fec2cc9917ca22622cdcadc8541ab&auto=format&fit=crop&w=1041&q=80);
background-repeat: no-repeat;
max-height: 100%;
}
.menu-two:hover > .menu-content{
opacity:0; transition:opacity 500ms ease;
}
<section class="section-four">
<div class="menu-one">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
<div class="menu-two">
<div class="menu-content">
<h2>Menu Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere incidunt blanditiis nisi ipsum, nesciunt, nemo autem voluptatibus accusamus obcaecati debitis molestiae. Est labore repellendus delectus error a modi quod dolor.</p>
</div>
</div>
</section>
I am trying to set 3 columns in a row with same height. Everything works so far using flex and fixed height except that paragraph is cut out. Both the title and text could be of various length. Currently .btn-wrapper has padding-top which gives illusion of space around. Is there a way to fix that so that all letters are visible? It doesnt matter how paragraph ends, only that there is a space between button and the text.
Is there a better way to go around this?
http://codepen.io/anon/pen/QKbAwb?editors=1100
<div class="col col-md-4">
<div class="col-inside">
<p>Lorem ipsum..../p>
<div class="btn-wrapper">
Read more
</div>
</div>
</div>
.col {
display: flex;
}
.col-inside {
flex: 1;
flex-direction: column;
height: 200px;
overflow: hidden;
position: relative;
}
.btn-wrapper {
position: absolute;
bottom: 0;
width: 100%;
padding-top: 20px;
background-color: #fff;
}
Currently if the text is long it will be cut out like in this image
You don't need a fixed height, you need to extend the flex properties to the .row div.
This will automatically make all the columns the same height.
Oh and you don't need to position the button div either...flexbox can do that to.
.row {
display: flex;
}
.col {
padding: 0;
flex: 1;
display: flex;
flex-direction: column;
}
.col-inside {
border: 1px solid #999;
flex: 1;
display: flex;
margin: 0 10px;
flex-direction: column;
}
h2 {
margin-top: 0;
font-size: 26px;
font-weight: 600;
padding: 20px;
padding-bottom: 0;
}
.author {
font-style: italic;
font-size: 13px;
margin-bottom: 10px;
padding: 0 20px;
}
p {
padding: 0 20px;
}
.btn-wrapper {
margin-top: auto;
width: 100%;
padding-top: 20px;
background-color: #fff;
}
.btn.btn-default {
width: 100%;
display: block;
border-radius: 0;
background-color: grey;
color: #eee;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col col-md-4">
<div class="col-inside">
<img src="http://placehold.it/420x150" class="img-responsive" />
<h2>Some title</h2>
<div class="author">John Smith</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui obcaecati dolores at cupiditate ullam quaerat earum, quaerat earum, magni explicabo eveniet saepe! quaerat earum, magni explicabo eveniet saepe! magni explicabo eveniet saepe!</p>
<div class="btn-wrapper">
Read more
</div>
</div>
</div>
<div class="col col-md-4">
<div class="col-inside">
<img src="http://placehold.it/420x150" class="img-responsive" />
<h2>Some title longer Some title longer Some title longer Some title longer</h2>
<div class="author">John Smith</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui cupiditate quaerat earum, magni explicabo eveniet saepe!</p>
<div class="btn-wrapper">
Read more
</div>
</div>
</div>
<div class="col col-md-4">
<div class="col-inside">
<img src="http://placehold.it/420x150" class="img-responsive" />
<h2>Some title</h2>
<div class="author">John Smith</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.Qui obcaecati dolores at cupiditate ullam quaerat earum, magni explicabo eveniet saepe! amet, consectetur adipisicing elit. Qui obcaecati dolores Qui obcaecati dolores at cupiditate ullam
quaerat earum, magni explicabo eveniet saepe! quaerat earum, magni explicabo eveniet saepe! amet, consectetur adipisicing elit. Qui obcaecati dolores eveniet saepe! amet, consectetur adipisicing elit. Qui obcaecati dolores eveniet saepe! amet,
consectetur adipisicing elit. Qui obcaecati dolores</p>
<div class="btn-wrapper">
Read more
</div>
</div>
</div>
</div>
</div>
Codepen Demo