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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:20:30+00:00 2026-06-15T23:20:30+00:00

Hoping for some advice around a CSS issue – I have a layout where

  • 0

Hoping for some advice around a CSS issue – I have a layout where I’m absolutely positioning link text above a background image, but cannot get the link to expand to the height of the container (in IEx, works fine in Chrome)

<div>
    <img />
    <a />            
</div>

The containing div has a background colour, and the image has its opacity reduced – on hovering the image, the opacity reduces further, leaking more of the background color. At the same time, the opacity of the link changes from 0 to 100. I’m using a few CSS transitions as well, just to prettify it.

I know that positioning the link absolutely removes it from the flow, so setting height to 100% won’t work, but shouldn’t I be able to set it explicitly? Doing so works in Chrome but not IE. Problem is related to the image, as the link behaves correctly if it is removed.

Example:http://jsfiddle.net/thSCJ/8/ (includes just enough detail to highlight my problem. In IE, hovering the top left of the image reveals the link. In Chrome, any hover on the image reveals the link).

Any suggestions?

  • 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-15T23:20:32+00:00Added an answer on June 15, 2026 at 11:20 pm

    You need to have the <a> tag wrapping the image and the text:

    <a href="#">
        <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR6kpJ562NTt7Vkya4ocQ3Aq7mVqNB04ccB9XNCr-b4mPdYU6Y5Yg" width=200 height=200/>
        <span>Link text</span>
    </a>​
    

    Here is the CSS:

    a {
        width:200px;
        height:200px;
        background:#cccccc;
    }
    
    a:hover > span {
        display: inline;
    }
    
    span {
        display: none;
        position:absolute;
        top:0;
        left:0;
        width:200px;
        height:200px;
        color:red;      
    }
    

    ​

    Fiddle: http://jsfiddle.net/thSCJ/12/

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

Sidebar

Related Questions

I was hoping to get some advice on what to do. I have a
Hi I am hoping for some advice. I have just managed to get a
Hoping I can get some architectural advice on this. I have been given the
I was hoping for some advice on how to restrict user access to subdomains.
I'm hoping people have some ideas to help solve this problem. I am developing
I have a problem that I'm hoping to get some direction in solving -
first post here on stack overflow, hoping to get some advice on how to
I was hoping I could get some advice on why my nodejs program is
I am hoping for some advice on how to speed up the download of
I am hoping for some advice in partitioning my new MacBook Pro's 500GB drive

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.