Skip to content

Instantly share code, notes, and snippets.

@dannymichel
Created November 30, 2012 03:44
Show Gist options
  • Save dannymichel/4173657 to your computer and use it in GitHub Desktop.
Save dannymichel/4173657 to your computer and use it in GitHub Desktop.
.bricks{position:relative;}
.brick{margin-bottom:20px;}
.brick ul li.taxonomy{font-style:italic;margin:5px 0;}
.brick h3.entry-title{margin:0;}
.brick ul.categories{margin:0;padding:0;}
.expo_wrap{position:absolute;z-index:1;height:100%;width:100%;top:0;left:0;padding:9px;background:#fff;display:none;}
<ul class="row bricks clearfix">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li class="four columns brick">
<article>
<a href="<?php the_permalink(); ?>" rel="bookmark" class="url">
<img src="<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'brick'); echo $image[0]; ?>" class="brickimg" >
<div class="expo_wrap">
<div class="expo">
<ul class="categories">
<li class="taxonomy taxonomy-identity"><?php $category = get_the_category(); echo $category[0]->category_nicename; ?></li>
</ul>
<h3 class="entry-title"><?php echo get_the_title(); ?></h3>
</div>
</div>
</a>
</article>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
.brick is the parent
.expo_wrap is what i need to show on hover of .brick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment