Skip to content

Instantly share code, notes, and snippets.

@srikat srikat/style.css
Last active Dec 23, 2015

Embed
What would you like to do?
CSS for Pinterest-like Masonry layout in Genesis. Details: http://sridharkatakam.com/using-masonry-genesis-pinterest-like-layout/
/****************************************************************
Pinterest-like Masonry layout for Posts page and Archives
****************************************************************/
.masonry-page .content .entry {
padding: 0;
border-radius: 0;
width: 255px;
overflow: hidden;
}
.masonry-page .content .one-half,
.masonry-page .content .one-third,
.masonry-page .content .one-fourth,
.masonry-page .content .one-sixth {
margin-left: 0;
}
.masonry-page .content .title-content {
padding: 2rem;
}
.masonry-page .content .entry-title {
font-size: 1.6rem;
line-height: 1.4;
}
.masonry-page .content .entry-content a {
border-bottom: none;
}
.masonry-page .content .entry-content p {
margin-bottom: 0;
}
.masonry-page .content .entry-content p.entry-permalink {
padding-left: 2rem;
padding-right: 2rem;
}
.masonry-page .content .entry-content a.more-link {
font-size: 1.4rem;
}
.masonry-page .content .entry-footer {
padding: 1rem 2rem;
border-top: 1px dashed #F5F5F5;
}
.masonry-page .content .entry-footer .entry-meta {
margin: 0;
padding: 0 0 1rem 0;
border-top: none;
}
.masonry-page .content .entry-pagination {
padding-left: 2rem;
padding-right: 2rem;
}
/*Image hover*/
.masonry-page .content img.post-image {
-khtml-opacity: 1;
-moz-opacity: 1;
opacity: 1;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=100)"; /* IE 8 */
filter: alpha(opacity=100); /* IE 4, 5, 6 and 7 */
zoom:1 /* so the element "hasLayout" or, to trigger "hasLayout" set a width or height */
-webkit-transition: all .2s linear;
-moz-transition: all .2s linear;
-o-transition: all .2s linear;
transition: all .2s linear;
}
.masonry-page .content img.post-image:hover {
-khtml-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=70)"; /* IE 8 */
filter: alpha(opacity=70); /* IE 4, 5, 6 and 7 */
zoom:1; /* so the element "hasLayout" or, to trigger "hasLayout" set a width or height */
}
/*Comment this out if infinite scrolling is NOT being used*/
.masonry-page .archive-pagination {
display: none;
}
/* Infinite Scroll loader */
#infscr-loading {
text-align: center;
z-index: 100;
position: fixed;
left: 45%;
bottom: 40px;
width: 200px;
padding: 10px;
background: #000;
opacity: 0.8;
color: #FFF;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
/*Media Queries*/
@media only screen and (max-width: 1023px) {
body.masonry-page {
background: #F5F5F5;
}
}
/*For .site-inner width of 1140px, 4-columns*/
@media only screen and (max-width: 768px) {
.masonry-page .content .entry {
width: 325px;
}
}
/*For .site-inner width of 1140px, 3-columns*/
@media only screen and (max-width: 768px) {
.masonry-page .content .entry {
width: 690px;
}
}
@media only screen and (max-width: 480px) {
.masonry-page .content .entry {
width: 430px;
}
}
@media only screen and (max-width: 320px) {
.masonry-page .content .entry {
width: 287px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.