Forum Moderators: not2easy

Message Too Old, No Replies

Some Help

         

EricJ

5:29 am on Jan 8, 2010 (gmt 0)

10+ Year Member



Well, I'm having a problem with my z-index. I've got all the positioning right, but the layers aren't working. :/ I've set it up to that a hover menu I downloaded is going to have a nice looking button behind it, with the text being transparent. However, it seems that won't work for me. (I'm only 17 btw, so if it's something stupid that I should have known, please don't be too hard on me XD)

<html>
<head>
<style type="text/css">
body {
margin: 0 auto;
background: #f5f5f5 url(images/pagebg.png) top left repeat-x;
font-family: Arial;
position: relative;
}

img {
border-style: none;
}

</style>
<link rel="stylesheet" type="text/css" href="droplinebar.css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script src="droplinemenu.js" type="text/javascript"></script>

<script type="text/javascript">

//build menu with DIV ID="myslidemenu" on page:
droplinemenu.buildmenu("mydroplinemenu")

</script>

</head>
<body>
<span style="float: right; padding: 10px; color: #FFF; opacity: 0.7; font-size: 11px;">Current Time:</span>
<span style="float: left; padding: 3px; background: url(images/bookmark.png) top left no-repeat; width: 232px; height: 31px; margin-top: 3px;" onclick="location.href='#';"></span><br />
<div style="position: absolute; left: 0px; top: 36px; background: url(images/logo.png) top left no-repeat; width:560px; height: 121px;"></div><br />
<div style="width: 131px; height: 53px; background: url(images/home.png) bottom center no-repeat; position: absolute; left: 15px; top: 163px; z-index: 1;"></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />

<div id="mydroplinemenu" class="droplinebar">
<ul>
<li><a href="http://www.dynamicdrive.com/">Home</a></li>
<li><a href="http://www.dynamicdrive.com/style/">CSS Examples</a>
<ul>
<li><a href="#">Activities 1</a></li>
<li><a href="#">Activities 2</a></li>
<li><a href="#">Activities 3</a>
</li>
<li><a href="#">Activities 4</a></li>
</ul>
</li>
<li><a href="http://tools.dynamicdrive.com">Tools</a></li>
<li><a href="http://www.javascriptkit.com/">JavaScript</a>
<ul>
<li><a href="#">Traveling 1</a></li>
<li><a href="#">Traveling 2</a></li>
<li><a href="#">Traveling 3</a></li>
<li><a href="#">Traveling 4</a>
</li>
<li><a href="#">Traveling 5</a></li>
</ul>
</li>
<li><a href="http://www.cssdrive.com">Gallery</a></li>
</ul>
</div>

</body>
</html>

CSS_Kidd

7:41 pm on Jan 8, 2010 (gmt 0)

10+ Year Member



<link rel="stylesheet" type="text/css" href="droplinebar.css" />

<script src="droplinemenu.js" type="text/javascript"></script>

This would be my first question to you:
Have you put these two files into their designated directories with in your main directory?

From your HTML source you called them from your "root" directory. Is this were they are located?

Also without actually seeing the source for "droplinebar.css" and "droplinemenu.js" it makes it hard to see where there might be an issue, because it appears that the navigation is located in a div that calls a class and an id from the css file. Pleas post those two sources as well, so we can check it all.