/**
 * This value is important. It prevents the images on the last row from 
 * being to big. If you want to change this you might also have to change
 * gridBasis. Remove this and we might end up with a very big last image.
 */
.grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  margin: 2px;
  /**
   * Our grid element. We're adding a little bit of margin to more clearly 
   * show our images.
   */
  /**
   * A title element, only showed when hovering the images
   */
}
.grid img {
  width:100%;
}
.grid__element {
  position: relative;
  margin: 2px;
  line-height: 0;
  
}
.grid__element:hover .grid__title {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}
.grid__element:nth-last-child(1), .grid__element:nth-last-child(2) {
  max-width: 1400px;
}
.grid__title {
  display: none;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 40px;
  background: rgba(255, 255, 255, 0.6);
}
.grid__title p {
  -ms-flex-item-align: center;
      -ms-grid-row-align: center;
      align-self: center;
  font: 20px/1.4 Helvetica;
}

body {
  margin: 0;
}
