Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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/

like image 239
Fabián Avatar asked Aug 09 '13 22:08

Fabián


2 Answers

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

like image 167
Austen Avatar answered Dec 21 '22 12:12

Austen


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;
}
like image 33
Chris Bier Avatar answered Dec 21 '22 10:12

Chris Bier