• Welcome to The Cave of Dragonflies forums, where the smallest bugs live alongside the strongest dragons.

    Guests are not able to post messages or even read certain areas of the forums. Now, that's boring, don't you think? Registration, on the other hand, is simple, completely free of charge, and does not require you to give out any personal information at all. As soon as you register, you can take part in some of the happy fun things at the forums such as posting messages, voting in polls, sending private messages to people and being told that this is where we drink tea and eat cod.

    Of course I'm not forcing you to do anything if you don't want to, but seriously, what have you got to lose? Five seconds of your life?

CSS Menu

Lorem Ipsum

Member
Pronoun
x
I am totally redesigning my website after it got hacked, and as part of this redesign, I have been working on a drop down menu, following the example of an article from A List Apart.

Yet, although I have built the menu, I need the top buttons to overlap with the banner image, and I do not know how to do this. I am not sure whether it will require sprite positioning with more CSS, or it is simply a matter of positioning.

Here is the CSS code for the menu at the moment.

Code:
	#nav {
		margin: 0;
		padding: 0;
	}

	#nav li.on ul, #nav li.off ul {
		margin: 0;
		padding: 0;
	}

	#nav a {
		text-decoration: none;
	}

	#nav li { /*float the main list items*/
		margin: 0;
		float: left;
		display: block;
		padding-right: 15px;
	}

	#nav li ul {
		display: none;
	}

	#nav li.off ul, #nav li.on ul { /*put the subnav below*/
		position: absolute;
		top: 266px;
		*top: 44px;
		left: 5px;
		padding-top: 10px;
		background: #d6e3b0;
		height: 28px;
		width: 640px;
	}

	#nav li a {
		color: #EBEFE0;
		font-weight: bold;
		display: block;
		height: 15px;
		width: 100px;
		border: 2px solid #d6e3b0;
		padding: 5px;
	}

	#nav li.on a {
		border: 2px solid #7a8566;
		color: #7a8566;
	}

	#nav li.on ul a, #nav li.off ul a {
		float: left; /*ie doesn't inherit the float*/
		border: 0;
		color: #7a8566;
		width: auto;
		margin-right: 15px;
	}

	#nav li.on ul {
		display: block;
	}

	#nav li.off:hover ul {
		display: block;
		z-index: 6000;
				}

	#nav li.off a:hover, #nav li:hover a {
		background: #d6e3b0;
		color: #7a8566;
	}

And here is the test file:
Code:
<html>
<head>
<title>Test</title>
<link href="topstyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<img src="olivebanner.png">
<ul id="nav">
<li class="on"><a href="#">Sitely</a>
<ul>
	<li><a href="index.php">Homepage</a></li>
	<li><a href="affiliate.php">Affiliate</a></li>
	<li><a href="link.php">Link to Us</a></li>
	<li><a href="contact.php">Contact Me</a></li>
	<li><a href="credit.php">Credits</a></li>
</ul></li>
<li class="off"><a href="#">Pokémon</a>
<ul>
	<li><a href="shellder.php">Shellder</a></li>
	<li><a href="histofmon.php">History of Pokémon</a></li>
</ul></li>
<li class="off"><a href="#">Philosophy</a>
<ul>
	<li><a href="human.php">Being Human</a></li>
</ul></li>
<li class="off"><a href="#">Fun</a>
<ul>
	<li><a href="passgenerator.php">PassGen</a></li>
	<li><a href="logic1.php">Riddle Game</a></li>
	<li><a href="bmi.php">BMI Calculator</a></li>
	<li><a href="chatot.php">Chatot's Corner</a></li>
</ul></li>
</ul>
</body>
</html>

If you can help me, it would be greatly appreciated.
 
I think I know what you're talking about...
I guess you just want the page below the image to move up. If so, try putting this in your CSS (replacing $$ with a negative value of how many pixels you want the page to move up):
Code:
#banner {
background:transparent url(doofbanner.png) repeat scroll 0 0;
height:229px;
left:25%;
position:absolute;
top:10px;
width:577px;
z-index:-200;
margin: 0;
margin-top: $$;
}
 
Back
Top Bottom