Equal Height Div

HTML

<flex-container>
    <flex-item>
        <p>Text Text Text</p>
        <p>Text Text Text</p>
        <p>Text Text Text</p>
        <p>Text Text Text</p>
    </flex-item>
    <flex-item>
        <div>Forward</div>
    </flex-item>
</flex-container>

CSS

body {
    height: 300px;
    color: white;
}

flex-container {
    display: flex;                 /* primary flex container */
    flex-direction: row;           /* horizontal alignment of flex items (default value; can be omitted) */
    align-items: stretch;          /* will apply equal heights to flex items (default value; can be omitted) */
    height: 100%;
}

flex-item {
    display: flex;                 /* nested flex container */
    flex-direction: column;        /* vertical alignment of flex items */
    justify-content: center;       /* center flex items vertically */
    align-items: center;           /* center flex items horizontally */
}

flex-item:first-child {
    background-color: #a333c8;
    flex: 3;                       /* consume 3x available space than sibling;
                                      more details: http://stackoverflow.com/q/34644807/3597276 */
}

flex-item:last-child {
    background-color: #db2828;
    flex: 2;
}

Source

Simple Slide Up content on Hover

A simple css trick to make your thumbnail have a slide up effect on mouse hover.

HTML

<div class="col-md-4 box_industries">
<div>
<div class="image fill"><img src="http://lorempixel.com/g/400/200/" width="363" height="159" /></div>
<div class="content">
<h5>Title</h5>
This is my content

</div>
</div>
</div>

CSS

.box_industries {
background: green;
overflow: hidden;
text-align: center;
position: relative;
}

.box_industries .content
{
background: rgba( 0, 0, 0, 0.9 );
bottom: -100%;
color: #fff;
height: 100%;
left: 0%;
text-align: center;
position: absolute;
transition: bottom 0.5s ease;
width: 100%;
}
.box_industries:hover .content
{
bottom: 0%;
}

Centered Div

CSS

div.outer-div {
height: 170px;
width: 300px;
background-color: lightgray;
}

div.middle-div {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}

HTML

<div class=”outer-div”>
<div class=”middle-div”></div>
</div>