1

Looking for the View Button to be locked to the bottom, using position:absolute; would cause the price to merge into the View Button.

https://jsfiddle.net/kieranbs96/pj8emf0a/

a.view-button {
 float: left;
 padding: 7px 30px;
 background: #e35f00;
 color: #ffffff;
 text-transform: uppercase;
}

.offer, .recommendation {
 float: left;
 flex: 1 0 32%;
 margin: 0 0.3%;
 width: 32%;
 position: relative;
}

Any questions please ask.

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Kieran Smith
  • 119
  • 10

1 Answers1

1

You need to make your div.offer box a (nested) flex container in column-direction. Then pin the view button to the bottom with a flex auto margin.

.offer, .recommendation {
    float: left;
    flex: 1 0 32%;
    margin: 0 0.3%;
    width: 32%;
    position: relative;

    display: flex;          /* new */
    flex-direction: column; /* new */
}

a.view-button {
    float: left;
    padding: 7px 30px;
    background: #e35f00;
    color: #ffffff;
    text-transform: uppercase;
    position: relative;
    bottom: 0;
    left: 0;

    margin-top: auto;       /* new */
}

revised fiddle

A few more things to keep in mind:

Community
  • 1
  • 1
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701