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

Home Posts Topics Members FAQ

z-index style not working

Hello,

The appearance of the page should be for the main image, lpmap.jpg, to
be on the bottom, (z-index: 1), with pictures, (image0.jpg -
image9.jpg), and accompaning notes to appear on top, (z-index: 2),
minimized to 20px x 20px width & height, using the box model. These 10,
(point0 to point9), are positioned on the map with the position style.
These small images should then enlarge when the mouse hovers over them,
(z-index: 3).

The problem I am having is that the picture with z-index of 1,
(lpmap.jpg), does not appear underneath the elements (.notes class).
The .notes are not visible, (z-index: 2). To bebug, I temporarily
removed lpmap.jpg, and then I could see the 20px x 20px images that
should appear on top. Also, when I hovered the mouse over them, they
enlarged as directed in the css style declaration,

..notes a:hover {width: 150; height: 170; overflow: visible; z-index:
3;}

I am aware that the elements subject to a z-index style must be
positioned using the absolute position, (I think my code is OK here?).
They also share a common parent, <div id="online_map" >.

Can the browser determine that they share a common parent or must the
code explicitly state that?

My code: #lpmap {position: absolute; left: 0; top: 0; width: 600;
height: 294; z-index: 1;}
Should be(?): #online_map #lpmap {position: absolute; left: 0; top: 0;
width: 600; height: 294; z-index: 1;}
TIA for any help. I've really spent alot of time trying to figure this
one out, Googled for similar problems, but no one seemed to have the
problem I do.

Chris

<html>
<head>
<!--
Filename: longs.htm
Supporting files: image0.jpg - image9.jpg, lpmap.jpg
-->
<title>Longs Peak Online Map</title>
<style type="text/css" media="screen, tv, tty">
body {font-family: sans-serif;}
a {text-decoration: none;}
img {border: 0;}
#summary {position: absolute; top: 350; width: 600;}
#online_map {position: absolute; left: 5; top: 5;}
#lpmap {position: absolute; left: 0; top: 0; width: 600; height:
294; z-index: 1;}
#instruction {position: relative; top: 300; width: 600; font-size:
..8em;}
..notes p {margin: 5; font-size: 8pt;}
..notes span {color: yellow}
..notes a {background-color: blue; color: white; width: 20; height:
20;
z-index: 2; overflow: hidden;}
..notes a:hover {width: 150; height: 170; overflow: visible;
z-index: 3;}
#point0 {position: absolute; left:560; top: 60}
#point1 {position: absolute; left:277; top: 90}
#point2 {position: absolute; left:175; top: 0}
#point3 {position: absolute; left:110; top: 115}
#point4 {position: absolute; left:55; top: 165}
#point5 {position: absolute; left:5; top: 180}
#point6 {position: absolute; left:15; top: 222}
#point7 {position: absolute; left:50; top: 245}
#point8 {position: absolute; left:100; top: 245}
#point9 {position: absolute; left:90; top: 220}
</style>
</head>

<div id="summary">
<body>
<h2>Longs Peak <span id="hideprint"> Online</span> Trail Map</h2>
<p>At 14,255 feet, Longs Peak towers above all other summits in Rocky
Mountain National
Park. The summer is the only season in which the peak can be climbed by
a non-technical
route. Early mornings break calm, clouds build in the afternoon sky,
often exploding in
storms of brief, heavy rain, thunder and dangerous lightning. Begin
your hike early,
way before dawn, to be back below timberline before the weather turns
for the
worse.</p>
<p>The Keyhole Route, Longs Peak's only non-technical hiking pathway,
is a 16 mile
round trip with an elevation gain of 4,850 feet. Though non-technical,
the Keyhole
Route is still challenging and is not recommended for those who are
afraid of heights
or exposed ledges. Hikers should be properly outfitted with clothing,
food and water.
Use caution when ascending or descending steep areas. Don't be afraid
to back down when bad
weather threatens.</p>
</div>

<div id="online_map" >
<div id="lpmap"><im g src="lpmap.jpg" alt="" /></div>
<div id="point0" class="notes">
<a href="#">
<img src="image0.jpg " alt="" /><br />
<p>
<span>3:30 a.m.</span> Start from the Longs Peak Ranger
Station,
nine miles south of Estes Park. Be sure to pack food, extra
water, sunblock,
and warm clothes, gloves, and caps.
</p>
</a>
</div>
<div id="point1" class="notes">
<a href="#">
<img src="image1.jpg " alt="" /><br />
<p>
<span>5:30 a.m.</span> Stop at Mills Moraine for a view of
the
sunrise.
</p>
</a>
</div>
<div id="point2" class="notes">
<a href="#">
<img src="image2.jpg " alt="" /><br />
<p>
<span>7:30 a.m.</span> Time for break at Granite Pass.
</p>
</a>
</div>
<div id="point3" class="notes">
<a href="#">
<img src="image3.jpg " alt="" /><br />
<p>
<span>8:30 a.m.</span> Climb through the Boulder Field on
the
way to the Keyhole.
</p>
</a>
</div>
<div id="point4" class="notes">
<a href="#">
<img src="image4.jpg " alt="" /><br />
<p>
<span>9:00 a.m.</span> Stop at the
Agnes Vaille shelter for a well-deserved breakfast.
</p>
</a>
</div>
<div id="point5" class="notes">
<a href="#">
<img src="image5.jpg " alt="" /><br />
<p>
<span>9:30 a.m.</span> It's time to go through
the Keyhole. Be prepared for heavy winds.
</p>
</a>
</div>
<div id="point6" class="notes">
<a href="#">
<img src="image6.jpg " alt="" /><br />
<p>
<span>10:00 a.m.</span> Follow the painted targets along
the Ledges.
</p>
</a>
</div>
<div id="point7" class="notes">
<a href="#">
<img src="image7.jpg " alt="" /><br />
<p>
<span>11:00 a.m.</span> Take special care when crossing the
Narrows.
</p>
</a>
</div>
<div id="point8" class="notes">
<a href="#">
<img src="image8.jpg " alt="" /><br />
<p>
<span>11:15 a.m.</span> You're almost there! Climb the
Homestretch
to reach the summit.
</p>
</a>
</div>
<div id="point9" class="notes">
<a href="#">
<img src="image9.jpg " alt="" /><br />
<p>
<span>11:45 a.m.</span> Congratulations , you've reached the
top!
Time for lunch and a few photos.
</p>
</a>
</div>
<div id="instruction ">Move your mouse pointer over the numbered
landmarks
in the map to preview the hike.
</div>
</div>

</body>

</html>

Jul 23 '05 #1
3 5821
Just caught 2 flaws. The div element right before the <body> statement
should be right after it. The other is each element belonging to the
..notes class has a link, ( <a href="#"> ), enclosing a paragraph. This
is a problem because links shouldn't contain block elements. But making
these changes still doesn't appear to solve my problem with the display.

Jul 23 '05 #2
Previously in comp.infosystem s.www.authoring.html,
<ch*****@pulsen et.com> said:
Just caught 2 flaws.


When you have fixed any other validation errors in your HTML and CSS,
post a URL and we may be able to help.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #3
Hello Mark

Unfortunately there is no URL for this page - I am designing it on my
home computer. I realize that my posted code is not easy to read
because you lose the formatting of the text when you post to Google.

Did make the 2 changes above, but I still have the same problem.

Chris

If possible I could email the web page to you as an attachment if I had
an email address. Google isn't letting reply to author work at the
moment.

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

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
8
42520
by: Asad | last post by:
Hi, I am basically trying to accomplish drop down menus for navigation on a site. And I'm pretty much done except I am having one problem. The z-index is not working with relative positioning! Basically I have a page such as this: http://members.rogers.com/asadkhan2/prob2.jpg
21
3993
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does nothing in IE. I'd be greatful for any assistance. Also, if I will have problems the code on Opera or Safari, I'd appreciate any pointers--I don't have a Mac to test Safari. THanks very much, Michael
3
46360
by: Aquosus | last post by:
How do I change the z-index on a page I have tried document.getElementById(name).style.z-index and document.getElementById(name).style.Zindex I want to change the z-index to show a layer that is covered -- Totus possum, totum Deum.
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.
2
2324
by: zz2uk1 | last post by:
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. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Untitled Page</title> <style type="text/css"> ...
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
1
6150
by: bob2044 | last post by:
offsetHeight is not working in following code <script type="text/javascript"> function Coverdiv() { var standard=(document.compatMode=="CSS1Compat") ? document.documentElement:document.body; var dv = document.createElement("div"); dv.setAttribute("id","cover"); document.body.appendChild(dv); var cover=document.getElementById("cover");
0
9680
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, 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...
0
9528
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
10230
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
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
10012
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
6788
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();...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
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
3731
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.