473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

z-index order in Google Chrome

KeredDrahcir
426 256MB
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 1566

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

Similar topics

1
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
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...
0
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...
2
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...
5
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.