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 9101797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:13:24+00:00 2026-06-17T01:13:24+00:00

The problem started when I needed to have a div set at 60% opacity

  • 0

The problem started when I needed to have a div set at 60% opacity and on hover it animates to 90% opacity.

The only catch is I need a full white (non transparent) PNG image on top of this box at all times.

So I tried the trick of overlaying a separate div containing the image and used the margins to bring it into position; BUT the background div animation hover over doesn’t work when your mouse is on top of the image.

HTML

<div style="position:relative;top:-1px;left:0">
<div class="ontop"><img src="http://www.designdownloader.com/item/pngs/button01_google/button01_google-20110813210436-00005.png" alt="OneSpring - Play Video" /></div>
                <div id="box-video">


            </div>            
            </div>
</div>

CSS

#box-video {
    position: absolute;
    background-color:rgba(0,57,129,1);
    top: 0;
    left: 0;
    padding: 15px;
    font-family: 'Helvetica Neue Light', Arial, Helvetica, sans-serif;
    width: 210px;
    height: 130px;
    opacity: 0.6;
    filter: alpha(opacity=60);
     -webkit-transition: opacity .25s ease-in-out;
     -moz-transition: opacity .25s ease-in-out;
     -ms-transition: opacity .25s ease-in-out;
     -o-transition: opacity .25s ease-in-out;
     transition: opacity .25s ease-in-out;
}
#box-video:hover, .ontop:hover {
    cursor: pointer;
    /*color: #ffffff;*/
    text-decoration: none;
    opacity: 0.9;
    filter: alpha(opacity=90);
    zoom: 1;
    -webkit-transition: opacity .25s ease-in-out;
    -moz-transition: opacity .25s ease-in-out;
    -ms-transition: opacity .25s ease-in-out;
    -o-transition: opacity .25s ease-in-out;
    transition: opacity .25s ease-in-out;
}

div.ontop {
    position: relative;
    top: 4.7em;
    left:30px;
    z-index:1002;
}

Here is a JSFiddle showing the problem:

http://jsfiddle.net/xpancom/fZrWA/

How can you make the background hover work even when you are on top of the image?

  • 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-17T01:13:25+00:00Added an answer on June 17, 2026 at 1:13 am

    Put an id on the container:

    <div id="box" style="position:relative;top:-1px;left:0">
    

    Now put the hover event on the container instead, and let it affect the child element:

    #box:hover {
      cursor: pointer;
    }
    
    #box:hover #box-video {
      opacity: 0.9;
      filter: alpha(opacity=90);
      zoom: 1;
      -webkit-transition: opacity .25s ease-in-out;
      -moz-transition: opacity .25s ease-in-out;
      -ms-transition: opacity .25s ease-in-out;
      -o-transition: opacity .25s ease-in-out;
      transition: opacity .25s ease-in-out;
    }
    

    Demo: http://jsfiddle.net/fZrWA/2/

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

Sidebar

Related Questions

I have a web app. I am using JSF2 framework. My problem started when
I am having a problem that just started happening in OS 3.1. I have
I just started using Eclipse but already I have a small problem. At first
I just started a graphical C++ course and I have problem getting an overview
I just started working with Android and I have a problem with my map.
I guess I have to set some context before I explain the problem I
I have a problem with i18n enums in my JSF application. When I started,
I have a problem I've been struggeling with for a full week now, and
The problem I started with is that I want to display in an ASP.NET
I remember running into this problem when I started using OpenGL in OS X.

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.