There is a code, and for some reason, z-index does not work in it, I do not understand anything. 500 times did work. Is it not here? I'm talking about opacity, why does it act on everyone, despite the z-index ?:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1251"> <style> #body_st { background-color:#ff5c5c; } #div_bg_img { position:relative; background-color:#33CC99; width:100%; height:300px; opacity:0.5; z-index:0; } #div_st { position:relative; background-color:#ffCC99; font:normal 14px trebuchet MS; width:30%; border:thin #666666 solid; left:50px; z-index:2; } </style> <title>TiTLE</title> </head> <body id="body_st"> <div id="div_bg_img"> <center> <span style="font:bold 28px trebuchet MS; color:#FFff00;">SPAN на DIV-1</span> </center> <br> <br> <div align="justify" id="div_st">DIV-2 <br> <hr> </div> </div> </body> </html>
What is wrong here? On other projects, I registered the opacity to one of some DIV and it was perfectly translucent, why does it not work like that here? Or for opacity there is no concept for or before? And he stupidly affects everything?