I'm not able to click a link inside of fixed div
Asked Answered
A

2

11

This link, which is inside of a div called .user_minibar with position:fixed; property, and being positioned at the top of the page, can't be clicked. When I put my mouse over that link, my cursor doesn't even turn into a pointer.

Unless I scroll down a little bit, I can't click it (it works to me only when my link is precisely below the h1 tag (weird, right?)).

Here's my jsfiddle: http://jsfiddle.net/Arkl1te/9XkHa/

Arteritis answered 9/8, 2013 at 22:3 Comment(1)
I've added a 1px solid red border to the h1 so you can see the issue clearly.Pianism
A
21

One of the top elements is probably overlapping your div. Try adding z-index: 1; to your .user_minibar.

Abusive answered 9/8, 2013 at 22:7 Comment(0)
N
3

Add z-index to .user_minibar, it is being overlapped by the h1.

.user_minibar{
    position: fixed;
    width: 250px;
    height: 30px;
    background: rgba(255,255,255,.8);
    border-bottom: 1px dotted red;
    color: red;
    font-size: 14px;
    z-index: 1;
}
Nashville answered 9/8, 2013 at 22:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.