Last active
April 7, 2018 03:53
-
-
Save djrmom/ac83bf2fb803cc5141c23f01c7edd411 to your computer and use it in GitHub Desktop.
facetwp basic 3 column responsive grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="fwp-grid"> | |
| <?php while ( have_posts() ) : the_post(); ?> | |
| <div class="fwp-grid-col"> | |
| <?php if ( has_post_thumbnail() ) : ?> | |
| <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?></a> | |
| <?php endif; ?> | |
| <?php the_title( '<h3><a href="' . esc_url( get_the_permalink() ) . '">', '</a></h3>' ); ?> | |
| </div> | |
| <?php endwhile; ?> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .fwp-grid { | |
| display: flex; | |
| flex-direction: row; | |
| flex-flow: wrap; | |
| justify-content: flex-start; | |
| width: 100%; | |
| } | |
| @media (max-width: 400px) { | |
| .fwp-grid { | |
| display: block; | |
| } | |
| } | |
| .fwp-grid .fwp-grid-col { | |
| padding: 1em 1em 1em 2em; | |
| width: 33.3%; | |
| text-align: center; | |
| } | |
| @media (max-width: 800px) { | |
| .fwp-grid .fwp-grid-col { | |
| width: 50%; | |
| } | |
| } | |
| @media (max-width: 400px) { | |
| .fwp-grid .fwp-grid-col { | |
| width: 100%; | |
| } | |
| } | |
| .fwp-grid .fwp-grid-col h3 { | |
| padding-top: .25em; | |
| } | |
| .fwp-grid img { | |
| max-width: 100%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment