Skip to content

Instantly share code, notes, and snippets.

@anemology
Last active May 6, 2020 11:42
Show Gist options
  • Save anemology/ef92a8120c78861c509da0b9b0e6fb33 to your computer and use it in GitHub Desktop.
Save anemology/ef92a8120c78861c509da0b9b0e6fb33 to your computer and use it in GitHub Desktop.
Make Instagram layout to 4 posts on each row
/* main section */
.cGcGK,
section._1SP8R {
max-width: none !important;
}
.cGcGK > div:nth-child(2) > div:nth-child(1) {
display: flex !important;
flex-flow: row wrap !important;
justify-content: center !important;
/*max-width: none !important;*/
}
section._9eogI {
max-width: 100% !important;
padding-left: 10px !important;
padding-right: 10px !important;
padding-top: 10px !important;
}
/* each post */
article._8Rm4L {
margin: 10px !important;
}
@media (max-width: 1600px) {
article._8Rm4L {
flex: 0 0 300px !important;
width: 300px !important;
max-width: 300px !important;
}
}
@media (min-width: 1601px) {
article._8Rm4L {
flex: 0 0 400px !important;
width: 400px !important;
max-width: 400px !important;
}
}
/* suggestion, copyright under stories, profile */
div._6Rvw2:nth-child(3),
div.SkY6J,
div.m0NAq,
.MnWb5 {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment