473,566 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

z-index order in Google Chrome

KeredDrahcir
426 Contributor
I have a box that need to display when the user clicks on a link. I want the background to grey out while the box is active. I found some code to do this using main CSS and little bit of JavaScript.
Expand|Select|Wrap|Line Numbers
  1. <div class="black_overlay" id="fade">
  2.     &nbsp;</div>
Expand|Select|Wrap|Line Numbers
  1. <div style="text-align: center; clear: both;">
  2.     <a href="javascript:void(0)" onclick="document.getElementById('light1').style.display='block';document.getElementById('fade').style.display='block'"><img alt="" border="0" height="228" src="/images/myuimage.jpg" width="225" /></a>
Expand|Select|Wrap|Line Numbers
  1. <div class="white_content" id="light1" style="bacground-color: transparent;">
  2. <a href="javascript:void(0)" onclick="document.getElementById('light1').style.display='none';document.getElementById('fade').style.display='none'"><img alt="Close" border="0" src="/images/close.png" style="position: absolute; right: 0px;" /></a>
  3. my content
  4. </div>
  5.  
Expand|Select|Wrap|Line Numbers
  1.  
  2. .black_overlay{
  3.     display: none;
  4.     position: fixed;
  5.     top: 0%;
  6.     left: 0%;
  7.     width: 100%;
  8.     height: 100%;
  9.     z-index:1001;
  10.     -moz-opacity: 0.8;
  11.     opacity:.80;
  12.     filter: alpha(opacity=80);
  13. }
  14. .white_content {
  15.     display: none;
  16.     position: fixed;
  17.     top: 25%;
  18.     left: 25%;
  19.     width: 567px;
  20.     height: 507px;
  21.     text-align: center;
  22.     padding: 0;
  23.     z-index:1002;
  24.     overflow: auto;
  25. }
I've got no problems in all browsers expect Google Chrome. In Google Chrome, the black appears above the white box even though the white box comes after the black in the code and has a higher z-index.
Aug 29 '13 #1
0 1575

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2058
by: Guy Macon | last post by:
Serious Security Flaw in Google Chrome: http://www.readwriteweb.com/archives/security_flaw_in_google_chrome.php -- Guy Macon <http://www.GuyMacon.com/>
0
6111
by: wpjoju | last post by:
i have this code which adds an event listener to a newly opened window but it doesn't seem to work in google chrome. the problem is window.addEventListener seem to work in chrome but if you do something like var win = window.open(); win.addEventListener... it doesn't seem to work, see my code below exportwin =...
0
1827
by: catoblepa80 | last post by:
How can i read all google chrome bookmarks and place it into a list or a dictionary? i think the best way is to use regular expressions on the chrome bookmarks file, can you help me to accomplish this task? Thank you
2
5296
KeredDrahcir
by: KeredDrahcir | last post by:
When using an object tag to embed a video file everything looks fine in Internet Explorer and Safari. However I can't get it to display at all in Opera. More importantly in Firefox and Google Chrome the height doesn't work so that you get it wide and short which distorts the video and makes it looks like bad layout. <object width="640px"...
5
6723
by: su817200 | last post by:
Dear Friend, Could you please let me know, how to enable ActiveX controls in Google Chrome Internet Browser. Is there any patch we need to install. Please let me know. Rgds,
3
3054
KeredDrahcir
by: KeredDrahcir | last post by:
Can anyone help me. I don't know if this is a mysql, php or Google Chrome error. I have a login form but for some reason I'm getting an error when I use Google Chrome. It used to work in all browsers (IE, Firefox, Safari, Opera, Google Chrome) but for some reason it has stopped working and Google Chrome. I assume it has something to do with me...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.