3
I’m having a problem creating a <div> masking and a link to disable this mask. In another layout that I had worked normally, now that I am performing the exchange it stopped working. I have the following code:
<div class="mascara" style="display: <?php echo ($this->conta_model->user('luz') == '0') ? 'block' : 'none';?>"></div>
<div class="user-controls">
<ul>
<li><a href="javascript:void(0);" id="botao" data-ref="<?php echo $this->conta_model->user('luz');?>"><img src="<?php echo base_url('uploads/shop/'.$luz.'.png');?>" id="imgluz" style="margin-top:-13px;" width="21"></a></li>
</ul>
</div>
Explaining this code, he gives block or none in the display of .masquerade depending on the information in the bank. Link #boot it alters this information in the bank, thus changing via jQuery to .masquerade for none or block also, but for this to happen the link has to be clickable and because of the mask that has the z-index: 1050 it does not let. I have tried to put the z-index of the link as 9999 but it didn’t. Link is the only one that has to be on top of .masquerade under any circumstances.
CSS .masquerade
.mascara{
position: fixed;
top:0;
bottom: 0;
left: 0;
right: 0;
background-color: #000;
width: 100%;
margin:0;
padding:0;
opacity:.80;
filter: alpha(opacity=80);
-moz-opacity: 0.80;
z-index: 1050;
}
The
z-indexonly works on positioned elements, try placingposition: relativeon the link– Miguel
I’ve tried to put the position as
relative,absoluteandfixedbut nothing solved ;/– Alisson Acioli
@Alissonacioli It is used bootstrap? puts code to see the simulate by error, add code snippet, we can track.
– KingRider
already tried a high z-index and with Important?
z-index: 9999 !important;. As has been said, need thepositionrelativeorabsolute.– Neuber Oliveira
It was using . link { width: 100%; height: 98px; display: block; z-index: 99999; } And the
z-indexdidn’t work, I put theposition: relativeand worked perfectly, Tks– Maria Eduarda Lipinski