Skip to content

Instantly share code, notes, and snippets.

@grahammills
Created November 5, 2013 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahammills/7319723 to your computer and use it in GitHub Desktop.
Save grahammills/7319723 to your computer and use it in GitHub Desktop.
Setting a height on responsive blocks
.block-type-one {
width: 100%;
padding-bottom: 66%;
background: #cccccc;
position: relative;
}
.block-type-inner {
position: absolute;
left: 10px;
right: 10px;
top: 10px;
bottom: 10px;
background: #66F;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment