Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Gary Ford
Gary Ford
14,475 Points

Pop up hover effect for image gallery

I'm looking for a pure CSS solution for a portfolio gallery that is like the image hover effect on Panic's homepage: http://www.panic.com. When the visitor hovers over an image thumbnail a larger image appears with a description of the project. Any suggestions would be much appreciated.

4 Answers

Jacob Miller
Jacob Miller
12,466 Points

On the panic.com website, they're adding the images as backgrounds to <a> elements, then they're just changing the background size on hover. I believe they're using Javascript or JQuery to make the information pop up. Here's their HTML to show you how you could set this up:

<li id="app_dietcoda">
    <a href="dietcoda/">
        Diet Coda
    </a>
    <div class="popover">
        <h3>
            Diet Coda
        </h3>
        <p>
            <a href="dietcoda/">
                A portable iPad Coda, perfect for quick web edits …
            </a>
        </p>
    </div>
</li>
Lars Carlsson
Lars Carlsson
10,078 Points

Hey Gary, this article I recently stumbled upon could be handy: http://designshack.net/articles/css/html5-css3-anchor-link-tooltips/

Cheers, Lars | Finland

Here's a pure CSS3 solution that roughly emulates what that site has: http://codepen.io/anon/pen/DnFAk

Gary Ford
Gary Ford
14,475 Points

Thanks everyone for your input. They are close to what I'm looking for. Will have to play around a bit with your suggestions along with digging into panic's css & coding with web dev tools.