z-index order in Google Chrome | Bytes (2024)

Home Posts Topics Members FAQ

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. <divclass="black_overlay"id="fade">
  2. &nbsp;</div>

Expand|Select|Wrap|Line Numbers

  1. <divstyle="text-align:center;clear:both;">
  2. <ahref="javascript:void(0)"onclick="document.getElementById('light1').style.display='block';document.getElementById('fade').style.display='block'"><imgalt=""border="0"height="228"src="/images/myuimage.jpg"width="225"/></a>

Expand|Select|Wrap|Line Numbers

  1. <divclass="white_content"id="light1"style="bacground-color:transparent;">
  2. <ahref="javascript:void(0)"onclick="document.getElementById('light1').style.display='none';document.getElementById('fade').style.display='none'"><imgalt="Close"border="0"src="/images/close.png"style="position:absolute;right:0px;"/></a>
  3. mycontent
  4. </div>

Expand|Select|Wrap|Line Numbers

  1. .black_overlay{
  2. display:none;
  3. position:fixed;
  4. top:0%;
  5. left:0%;
  6. width:100%;
  7. height:100%;
  8. z-index:1001;
  9. -moz-opacity:0.8;
  10. opacity:.80;
  11. filter:alpha(opacity=80);
  12. }
  13. .white_content{
  14. display:none;
  15. position:fixed;
  16. top:25%;
  17. left:25%;
  18. width:567px;
  19. height:507px;
  20. text-align:center;
  21. padding:0;
  22. z-index:1002;
  23. overflow:auto;
  24. }

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

Subscribe Reply

0 z-index order in Google Chrome | Bytes (3) 1584 z-index order in Google Chrome | Bytes (4)

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

Similar topics

1 2071

Serious Security Flaw in Google Chrome

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/>

HTML / CSS

6144

window.addeventlistener in google chrome

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 = window.open('ExportScreeningSafetyReport.aspx?qsid=' + qsid + '&title=' + title + (format ? '&format=' + format : ''));...

Javascript

1843

Read Google Chrome Bookmarks and place them into a collection

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

C# / C Sharp

2 5308

Object height problem in Firefox and Google Chrome

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" height="480px" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject"...

HTML / CSS

5 6740

ActiveX Controls in Google Chrome Browser

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,

Javascript

3 3062

How to fix mysql_result error that occurs only when using Google Chrome

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 upgrading to Windows 7. The error is this: Warning: mysql_result(): Unable to jump to row 0 on...

MySQL Database

8851

What is ONU?

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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...

General

9373

Problem With Comparison Operator <=> in G++

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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...

C / C++

1 9138

The easy way to turn off automatic updates for Windows 10/11

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 most users, this new feature is actually very convenient. If you want to control the update process,...

Windows Server

9074

Discussion: How does Zigbee compare with other wireless protocols in smart home applications?

by: tracyyun |last post by:

Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...

General

1 6676

Access Europe - Using VBA to create a class based on a table - Wed 1 May

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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...

Microsoft Access / VBA

5992

Couldn’t get equations in html when convert word .docx file to html file in C#.

by: conductexam |last post by:

I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

C# / C Sharp

4491

Trying to create a lan-to-lan vpn between two differents networks

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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

Networking - Hardware / Configuration

4761

Windows Forms - .Net 8.0

by: adsilva |last post by:

A Windows Forms form does not have the event Unload, like VB6. What one acts like?

Visual Basic .NET

2 2584

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

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

To disable or enable advertisem*nts and analytics tracking please visit the page.

z-index order in Google Chrome | Bytes (2024)

References

Top Articles
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 6127

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.