Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:26:53+00:00 2026-06-17T04:26:53+00:00

So I am working with Twitter Bootstrap to create a responsive thumbnail grid. When

  • 0

So I am working with Twitter Bootstrap to create a responsive thumbnail grid. When a thumbnail is hovered, I want the image title and an icon to appear.
At the moment this works as expected with this code:

HTML

<div class="container">
  <ul class="thumbnails">
    <!-- List start -->
    <li class="span3">
      <div class="thumbnail">
        <a href="#">
           <!-- Image -->
          <img src="http://www.placehold.it/300x200" />
          <p>
            <!-- Hover content -->
            <img src="http://i.computer-bild.de/imgs/4/3/2/6/8/2/2/Icon-Google-Drive-48x48-ddb8b51ac50e8859.png" /><br />
            <span>Mojo Babble</span>
          </p>
        </a>
      </div>
    </li>

  </ul>
</div>

CSS

.thumbnails li {
    position: relative;
    overflow: hidden;
}

.thumbnail a p {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,0,0,.4);
  text-align: center;
  opacity: 0;
}

.thumbnail a:hover p {
  opacity: 1;
}

Fiddle:
http://jsfiddle.net/PgqGg/

The only problem is the positioning. I want the icon & text to be somewhat vertically centered while considering 2 things:

  • The title has to be always visible, at least to some extend. I just don’t want to cut it up only because it’s two lines long.
  • The grid has to be responsive, so percentage values must be used I think. I do know that for touch devices there is no such thing as :hover, that will be dealt with using media queries.

I’ve already tried for some hours now to come up with a good solution, but I wasn’t really successful. At some point it always got messy, thats why I am asking for your help now.

How would you approach such scenario? Maybe use an icon font for the icon so I scales like text?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:26:54+00:00Added an answer on June 17, 2026 at 4:26 am

    Could have the icon as a background image instead and position the title appropriately.

    .thumbnail a:hover p {
      opacity: 1;
      background-image: url('http://i.computer-bild.de/imgs/4/3/2/6/8/2/2/Icon-Google-Drive-48x48-ddb8b51ac50e8859.png');
      background-position: center center;
      background-repeat: no-repeat;
    }
    
    .thumbnail a:hover p span 
    {
      position: absolute;
      top: 60%;
      margin-left: -40px;
      margin-top: 10px;
    }
    

    DEMO: http://jsfiddle.net/PgqGg/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use twitter bootstrap for some site I am working on. This
I am working on the twitter bootstrap website using this example to develop my
I don't understand why this is happening with my responsive twitter bootstrap nav. Here's
So I have been working on getting this Twitter Bootstrap typeahead to work and
I create topbar menu using twitter-bootstrap and It working fine .topbar .topbar-inner .container-fluid {{#view
I'm working with twitter bootstrap responsive nav bar and I'm trying to figure out
I have this Twitter Bootstrap's Tooltip working: $([rel=popover]) .popover() .click(function(e) { e.preventDefault() }); This
I'm working with a project that uses twitter-bootstrap-rails. This project was built on a
I'm working with Twitter Bootstrap and using a fluid design with media queries to
With Twitter Bootstrap 2, how do get links working within collapse-nav: <div class=navbar navbar-fixed-top>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.