html - How to position a link over another div that has position:absolute -


i have following html , css position of #header id has mandatory set absolute:

<div class="main">     <a href="www.website.com">     <div id="header" class="other"> </div>   #header{     padding-left: 250px;      position:absolute; } 

this code sets header div on link tag , becomes (the link) unavailable selecting.

my question css have apply .main > a not below header div?

i tried below not work other ideas welcomed:

.main > {     z-index:99999;   } 

z-index work on positioned elements

z-index wont applied if no positioning has been specified element. so, suggest change css below.

ie, new css .main > a like

.main > {     position:relative;     z-index:99999;   } 

update

z-index not work statically positioned elements..see answer here


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -