Created
August 6, 2016 21:59
-
-
Save grantambrose/c0ae2dded25476320bdfa5e7a2818593 to your computer and use it in GitHub Desktop.
Add custom previous / next post navigation on your single posts - CSS
This file contains 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
/* ---------------------- | |
SINGLE POSTS | |
---------------------- */ | |
/* SINGLE POST NAVIGATION - PREVIOUS / NEXT */ | |
.navi-previous-next{clear:both;font-style:normal;} | |
.navi-previous-next img{max-width:100%;height:auto;margin-bottom:5px;} | |
.navi-previous-next .navi-item{width:48%;float:left;margin-left:4%;margin-bottom:30px;} | |
.navi-previous-next .navi-previous{margin-left:0;text-align:left;} | |
.navi-previous-next .navi-next{text-align:right;} | |
@media only screen and (min-width: 992px) { | |
/* SINGLE POST NAVIGATION - PREVIOUS / NEXT for larger devices and up */ | |
.navi-previous-next a{font-size:0.8em;display:block;} | |
.navi-previous-next a:hover{text-decoration:none;} | |
.navi-previous-next .navi-title{display:none;} | |
.navi-previous-next .navi-icon a{font-size:24px;} | |
.navi-previous-next .navi-item{position:fixed;top:47%;max-width:150px;} | |
.navi-previous-next .navi-previous{left:10px;} | |
.navi-previous-next .navi-next{right:10px;} | |
.navi-previous-next .navi-post-content{display:none;-webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1); -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1); box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);border:5px solid #fff;background:#fff;} | |
.navi-previous-next .navi-item:hover .navi-post-content{display:block;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment