473,796 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DIV and zIndex

2 New Member
Im trying to show a text box above a div in a simple webpage.
Im viewing in IE 7 and Chrome and the text box is always below the div, although I have set the zIndex fairly high.
I have included my code.
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml" > 
  3. <head> 
  4. <title>Untitled Page</title> 
  5. <style type="text/css"> 
  6. #Text1 
  7. width: 244px; 
  8. </style> 
  9. </head> 
  10. <body> 
  11. <div id="myMainDiv" style="BORDER-RIGHT: 1px; BORDER-TOP: 1px; BORDER-LEFT: 1px; WIDTH: 800px; BORDER-BOTTOM: 1px; POSITION: relative; HEIGHT: 600px; BACKGROUND-COLOR: buttonface;" > 
  12. <div id="myChildDiv" style="DISPLAY: inline; FONT-SIZE: 8pt; LEFT: 74px; WIDTH: 320px; COLOR: windowtext; FONT-FAMILY: Arial; POSITION: absolute; TOP: 12px; HEIGHT: 212px; BACKGROUND-COLOR: #c0ffff" tag=""></div> 
  13. <input id="Text1" style="z-index: 1000" type="text" /> 
  14. </div> 
  15. </body> 
  16. </html>
Oct 28 '08 #1
2 2324
zz2uk1
2 New Member
I have it.

I set my zIndex on my nested Div to be -1 and it all worked.
Oct 28 '08 #2
Markus
6,050 Recognized Expert Expert
Glad you got that sorted.

Remember when you post code in the forums to wrap it in [code] tags. Simply highlight the text to be formatted, then hit the # button on the menu.

Thanks.
Oct 28 '08 #3

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

Similar topics

1
1429
by: JohnDpatriot | last post by:
After installing XP SP2 on my machine, I continually get the Script Error permission denied when I attempt to adjust the Zindex of an object on the page . see below document.getElementById(document.getElementById('CurrentLayer').value).style.zIndex=1; Before XP SP2 this app worked, and still does on all non-sp2 machines. Any help would be great
22
10364
by: DJ WIce | last post by:
Hi, I'm looking for a script to get the hi-est z-index on a page. I want my javascript menu to be always on top of the page (moves along on top when you scroll down). Does anyone know how to scann all items/elements on the page for a z-index? Thanks, Wouter
5
1528
by: Razzbar | last post by:
I'm using a div as a floating dialog box. I'd rather use a popup window, but due to all the popup blockers in use, I have to use another method, a div that has absolute positioning. The damn thing won't get in front of dropdown listboxes! I check the currentstyle.zindex of the listoxes, and they're set at 0. I set the div.style.zindex to some higher number, and it doesn't help. I minimize and restore the window, hoping it will redraw...
0
1309
by: torchestra | last post by:
I have two activex object. I have to different classes; one with z-index:2000 and one with z-index:1. Both classes have absolute positioning and left and top set to 0. The two objects is located on top of each other. I have to to it this way because I cannot communicate with an activex object with visibility:hidden in IE. At least I don't know how to do it. The problem is this. I set the visible object by changing the objects class....
0
1438
by: torchestra | last post by:
I have two activex object. I have to different classes; one with z-index:2000 and one with z-index:1. Both classes have absolute positioning and left and top set to 0. The two objects is located on top of each other. I have to to it this way because I cannot communicate with an activex object with visibility:hidden in IE. At least I don't know how to do it. The problem is this. I set the visible object by changing the objects class....
2
4573
by: reynoldlariza | last post by:
Can somebody please help me, i tried playing around with IE6 and Firefox 2.0 browser for setting zIndexes and hide & show of divs. It seems to work to both. I tried repeatedly clicking on different divs on IE and no problem, but on firefox if I do the same, some divs just got hidden without notice. try clicking variably on different divs and it will happen... How do I make this stable? ----------------------------- <HTML> <HEAD>...
1
1688
by: Sabbaath | last post by:
But haven't really found anything that answers the issue. Basically, I have a js function that has these lines in it, among others: var navSectionBg = document.getElementById("mainNav_" + whichNav + "Content"); navSectionBg.style.zIndex = newZ; All other changes to the css on the fly happen seemlessly, but the one line setting the zIndex does not work at all.
1
9492
by: gandhi.vishal | last post by:
Hello, I have an issue. I'm not seeing the reportviewer data at all. The column names come up fine but there is no data in the report table. Here is what I'm doing I created a dataset with the following query select * from av_project_mst where apm_project_id=@projectid Now I created a report (.rdlc) and dragged a table onto it and the report looks like the following
1
22454
Claus Mygind
by: Claus Mygind | last post by:
How come I can set this style element document.getElementById("popTime").style.left = "0px"; but not this document.getElementById("freqJobDiv").style.zIndex = "20"; I have two nested division on the screen. I want to use a mouseover to bring the back division to the front. It seems I can get all the style properties to work except for zindex
0
9530
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10182
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,...
0
10017
tracyyun
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...
0
9055
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5445
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...
1
4120
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
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.