Skip to content

Instantly share code, notes, and snippets.

@davidrenne
Last active August 29, 2015 14:28
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 davidrenne/c427cee31a4665089e7d to your computer and use it in GitHub Desktop.
Save davidrenne/c427cee31a4665089e7d to your computer and use it in GitHub Desktop.
MAGIC CSS CROP
#sectionFeatures p img, #sectionDining p img {
width: 100%;
background-position: center;
background-size: cover;
}
#sectionDining p {
width: 306px;
height: 219px;
overflow: hidden;
display: flex;
}
#sectionFeatures p {
width: 480px;
height: 343px;
overflow: hidden;
display: flex;
}
@davidrenne
Copy link
Author

src attributes or alt tags cannot be used. You must use background-image: url('xxx') on each image in the p tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment