Skip to content

Instantly share code, notes, and snippets.

@richtabor
Last active August 29, 2015 14:05
Show Gist options
  • Save richtabor/99fd2ebda5cce39fa9d9 to your computer and use it in GitHub Desktop.
Save richtabor/99fd2ebda5cce39fa9d9 to your computer and use it in GitHub Desktop.
<div class="overlay">
<h5>
<a title="<?php printf(__('Permanent Link to %s', 'bean'), get_the_title()); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h5>
</div>
<a class="entry-link" title="<?php printf(__('Permanent Link to %s', 'bean'), get_the_title()); ?>" href="<?php the_permalink(); ?>"></a>
.overlay {
background: none;
left: 0;
opacity: 0;
position: absolute;
text-align: center;
width: 100%;
top: 50% !important;
-webkit-transform: translate(0, -50%);
-moz-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
-o-transform: translate(0, -50%);
transform: translate(0, -50%);
}
li:hover .overlay {
opacity: 1;
}
.overlay h5 {
color: #282828;
display: inline-block;
margin: 0;
max-width: 90%;
vertical-align: middle;
}
.entry-link {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 30;
margin: 0!important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment