Skip to content

Instantly share code, notes, and snippets.

@evaletolab
Last active April 25, 2019 08:05
Show Gist options
  • Save evaletolab/7b74b9ca7059c6b8a7077ef4d7f57af5 to your computer and use it in GitHub Desktop.
Save evaletolab/7b74b9ca7059c6b8a7077ef4d7f57af5 to your computer and use it in GitHub Desktop.
css.md

image/content full width

.container {
  max-width:800px;
  width: calc( 100vw - 6rem );
  margin: 0 auto;
}
.image-fullwidth {
  max-width:100vw;
  width:100vw;
  margin: 0 calc( -50vw + 50% );
  // cover element
  max-height: 30vh;
  object-fit: cover;
}

.content-fullwidth {
  width:100vw;
  margin: 0 calc( -50vw + 50% );
  padding: 3em;
  font-size: calc( 12px + 1rem );
}

display table

.row{
  display:table;
  border-spacing:10px; // margin
}

.column{
  display:table-cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment