Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make div non-transparent to cover original div

I have a div "whitebox" which is basically a div that should cover my original "stimuli" div. It goes smooth and appears nicely, yet it does not cover the original div but seems to be transparent so that I can still see my original div though it. But I want it to be covered completely.

Apparently 'opacity' does not fix it.

<div id="stimuli"> Just press B and get started... </div>

$("#whitebox").fadeIn("fast").delay(500).fadeOut("fast");

CSS:

#whitebox{
    background: #fc3a54;
    opacity: 1;
    position:absolute;
    height: 80%;
    width: 70%;     
}

Is there a simple trick to fix the transparency issue with my code above, or any other hints?

like image 605
ben_aaron Avatar asked Dec 16 '25 15:12

ben_aaron


1 Answers

try using an image with #fc3a54 colour instead of using the background function, you can then use z-index to insure your whitebox is in front

like image 198
Plentybinary Avatar answered Dec 19 '25 04:12

Plentybinary