MyBB Community Forums

Full Version: More HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to make a drop down navigation menu that holds links that will also sprout out other links. Here's the HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title>Band Name | Home</title>
            <meta name="keywords" content="Band, Band Name" />
			<meta name="description" content="Tish is Band Name" />
			<script type="text/javascript">
                <!--//--><![CDATA[//><!--

                sfHover = function() {
	            var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	            for (var i=0; i<sfEls.length; i++) {
	            	sfEls[i].onmouseover=function() {
	        		this.className+=" sfhover";
	            	}
	         	sfEls[i].onmouseout=function() {
	       		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
	                    	}
                    	}
                }
                if (window.attachEvent) window.attachEvent("onload", sfHover);

                //--><!]]>
            </script>
            <link href="band.css" rel="stylesheet" type="text/css" />
		</head>
	<body>
	    <div id="header">

		    <h1>Band Name</h1>
			<h2>Witty Comment Here!</h2>
		</div>
		<div id="nav">
            <ul>
	        <li><a href="index.html">Home</a></li>
	        <li><a href="/band">The Band</a>

		                <ul>
			                <li><a href="/band/about.html">About</a></li>
			                <li><a href="/band/bios">Bios</a>
							    <ul>
								    <li><a href="/band/bios/max.html">Max Cosme</a></li>
								    <li><a href="/band/bios/garret.html">Garret Rhoades</a></li>
								    <li><a href="/band/bios/deacon.html">"Deacon" Jones</a></li>

							            <li><a href="/band/bios/fain.html">Brandon Fain</a></li>
								    <li><a href="/band/bios/miguel.html">Miguel Cosme</a></li>
								    <li><a href="/band/bios/shane.html">Shane Bailey</a></li>
							   </ul>
					</li>
                               </ul>
                <li><a href="networks.html">Social Networkings</a>

	              <ul>
								    <li><a href="http://www.myspace.com">Myspace</a></li>
									<li><a href="http://www.facebook.com">Facebook</a></li>
		     </ul>
		</li>
	        <li><a href="/discography">Discography</a>
	            <ul>

		            <li><a href="/discography/album1">1st Album</a>
					    <ul>
						    <li><a href="/discography/album1/song1.html">Song 1</a></li>
						</ul>
					</li>
				</ul>
			</li>
			<li><a href="/forums">Fan Forums</a></li>

			<li><a href="/blog">Blog/News</a>
			    <ul>
				    <li><a href="#">Recent Changes</a></li>
					<li><a href="#">Appearances</a></li>
					<li><a href="#">Site Changes</a></li>
					<li><a href="#">New Songs</a></li>

				</ul>
			</li>
			<li><a href="fanmail.html">Fan Mail</a></li>
		    </ul>
        </div>
		<div id="content"
		    <div id="left">
			    <h2>Recent Changes</h2>
				    <p>[Read More]</p>

				</h2>
				<h2>Comments</h2>
				    <p>[Read More]</p>
			</div>
			<div id="center">
			    <p id=locate">You are Here:<br />
				              <a href="index.html">Home</a>

				</p>
				<h2>Welcome!</h2>
				    <p>To the Band Name website.</p>
				<h2>Quick Intro</h2>
				    <p>Here's a quick introduction to our website and our band.</p>
					<p>{Donations}<br />

					<p>{Advertisements}</p>
			</div>
			<div id="footer">
			<p>Copyright &copy; 2009 <a href="http://www.totalityworks.co.cc">Totality Works</a>
			    Design by <a href="http://www.elegant-totality.info">Elegant Totality</a></p>

			</div>

The CSS:
#nav {
	height: 28px;
	background: #222;
}
#nav ul {
	float: left;
	padding: 0;
	margin: 0;
	list-style: none;
}
#nav li {
	position: relative;
	float: left;
}
#nav a {
	display: block;
	float: left;
	padding: 0 15px;
	line-height: 28px;
	color: #EEE;
	text-decoration: none;
}
#nav a:hover {
	color: #AAA;
}
#nav li ul {
	position: absolute;
	top: 28px;
	left: -999em;
	width: 150px;
}
#nav li li {
	width: 150px; /* width required here for Opera bug */
	border-top: solid 1px #555;
}
#nav li li a {
	width: 120px;
	padding: 5px 15px;
	line-height: 1.2;
	color: #EEE;
}
#nav li li a:hover {
	background: #AAA;
	color: #222;
}
#nav li:hover ul,
#nav li.sfhover ul {
	left: 0;
	z-index: 100; /* ensures drop down menus appear over other content on the Z-axis */
	background: #222; /* background (color at least) required here for IE7 bug */
}

But instead of what I'm wanting, I'm getting what you see: http://www.totalityworks.co.cc/band.html

The two lists are merging into one and losing some links. Can anyone help me?
I don't really see what's wrong. Screenshot might help.
(2009-01-19, 10:22 PM)MrD. Wrote: [ -> ]I don't really see what's wrong. Screenshot might help.

Max Cosme and everything under it should be next to Bios as another list but instead:
Also, your php variables arn't working.
what php variables?
(2009-01-21, 11:37 AM)MCII-Totality Wrote: [ -> ]what php variables?

I think Chasingu is talking about {Donations and {Advertisements}.

I'm pretty sure they are just their for place holders.
Wink yea. I haven't gotten the html for those yet. But forget the way the site looks now, I've changed it. Now the question is: How can you make a list drop down another list that sprouts out another list. If I can find an example of this I will show you