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

  • Home
  • SEARCH
  • 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 845437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:27:04+00:00 2026-05-15T06:27:04+00:00

OKay first off this is really really similiar to the http://dribbble.com homepage. In the

  • 0

OKay first off this is really really similiar to the http://dribbble.com homepage.

In the simplest form possible. I have an image, and i’m trying to CSS it so that when i hover over the image, a DIV shows up with some text and a partially transparent background color.

I have no idea how to do this..

  • 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-05-15T06:27:05+00:00Added an answer on May 15, 2026 at 6:27 am

    If what you want to obtain is an effect like that on Dribbble page, then you do not need to create a div over an img.

    It’s sufficient to have 2 versions of the image, one normal and one desaturated and with luminosity increased (or something like that, to give the impression of “transparency”).

    Now you create a div with the image as background and on mouseover you switch background and add the text.
    On mouseout you revert the changes.

    EDIT: Of course in practice you will dynamically assign the images name (e.g. with PHP), but that’s another story. You may even automagically generate the “transparent” image by using GD libraries I guess.

    A little example:

    CSS:

    .squareImg
        {
        display: block;
        width: 100px;
        height: 100px;
        background-image: url("100x100.jpg"); 
        }
    
    .squareImgOver
        {
        display: block;
        width: 100px;
        height: 100px;
        background-image: url("100x100transp.jpg"); 
        }
    

    HTML

    <div id="mydiv" class="squareImg" onmouseover="writeText();" 
        onmouseout="eraseText()"></div>
    

    JS

    function writeText()
        {
        var d = document.getElementById("mydiv");
        d.className = "squareImgOver";
        d.innerHTML = "something here!";
        }
    
    function eraseText()
        {
        var d = document.getElementById("mydiv");
        d.className = "squareImg";
        d.innerHTML = "";
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first, I can't stand Crystal! Okay, that's off my chest... Now, we have an
Okay, so first, I have searched for this everywhere but it seems like every
First off, I'm using XCode 4.0.2. Okay, here is my issue. I can build
Okay at first I thought this would be pretty straightforward. But I can't think
Okay this is my first WPF app and I am having a hard run
Okay. I have completed my first python program.It has around 1000 lines of code.
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay this question is very simple: I have a facebook page, and a website.
I have a question on return and recursive functions. This is again based off
Okay, first off I will attempt to explain what I'm trying to do. I

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.