0

I want to keep a div on another div, which is linked to any site.

here is my css

.link_div a {
    float:left;
    width:80px;
    height:20px;
    background:yellow;
}
.over {
    position:absolute;
    left:0;
    top:0;
    background:red;
    width:80px;
    height:20px;
}

here is html

<div class="link_div"> <a href="#">HELLO</a> </div>
<div class="over"></div>

Is this possible to keep "Over" div on top and link should be on ?

Kali Charan Rajput
  • 12,046
  • 10
  • 35
  • 46
  • Something like this? http://stackoverflow.com/questions/3680429/click-through-a-div-to-underlying-elements – Mathieu Nov 07 '11 at 11:20
  • What do you want here? The title suggests an order, but in your question you talk about being _on top_. Is `z-index`what you want or is it really the positioning on the screen? – Smamatti Nov 07 '11 at 11:20
  • @Smamatti I want keep div on top like we do in z-index. here problem is that Link is not working in this condition. I want Div on top of linked div and link should work. – Kali Charan Rajput Nov 07 '11 at 11:24

1 Answers1

2

This is an awesome post: Click through a DIV to underlying elements

Adding this css to your .over should do it:

pointer-events:none;

plus for IE:

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='your_transparent.png', sizingMethod='scale');
background:none !important;

You could get something like this then: http://www.searchlawrence.com/click-through-a-div-to-underlying-elements.html

All credits go to this guy's post of course.

Community
  • 1
  • 1
Mathieu
  • 3,073
  • 1
  • 19
  • 25