-
-
Save palimadra/2199799 to your computer and use it in GitHub Desktop.
WP-Create Date Badge with Wordpress and CSS
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="entryDate"> | |
<span class="postMonth"><?php the_time('M') ?></span> | |
<span class="postDay"><?php the_time('d') ?></span> | |
<span class="postYear"><?php the_time('Y') ?></span> | |
</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
body { font-size: 62.5%; } | |
.post { | |
position: relative; | |
margin-left: 4.8em; | |
} | |
.entryDate { | |
border: 1px solid #999; | |
font-family: Georgia,"Times New Roman", serif; | |
left: -4.8em; | |
line-height: 1; | |
position: absolute; | |
top: 0; | |
width: 3.5em; | |
} | |
.entryDate span { | |
display: block; | |
text-align: center; | |
} | |
.postMonth { | |
text-transform: uppercase; | |
font-size: 1.2em; | |
padding-top: 0.3em; | |
} | |
.postDay { font-size: 2em; } | |
.postYear { | |
background-color: #2358B8; | |
color: #FFF; | |
font-size: 1.2em; | |
padding: 0.3em 0; | |
margin-top: 0.3em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment