Horizontal CSS Menu's

Get Help With All Aspects of Web Design & Design Software

Moderators: Moderator, Global Moderator

Post Reply
Vercz
Hero Member
Hero Member
Posts: 1915
Joined: Sun May 09, 2004 6:13 am

Horizontal CSS Menu's

Post by Vercz »

[color=\"green\"]ok, ive been following a tutorial [url=\"http://www.tanfa.co.uk/css/examples/menu/tutorial-h.asp\"](found here)[/url] to make a Horizontal CSS Menu for my site, just thought it would be a nifty thing to learn really... and ive almost got it, looks how it should... the only problem is, the menu doesnt appear when i hover over it (like it should /blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />)

should work like this: [url=\"http://www.tanfa.co.uk/css/examples/menu/hs7.asp\"]http://www.tanfa.co.uk/css/examples/menu/hs7.asp[/url]

[code].body {
background-color: #000000;
font-family: Arial, Helvetica, Sans-serif;
margin: 0;
padding: 0px;
width: 80%;
color: #FFFFFF;
font-size: 13px;
z-index: 1;
}
a { text-decoration: none; }
.navs {
width: 100%;
text-align: left;
background-color: #000000;
text-align: center;
}
ul#navbar {
margin: 0;
width: 100%;
background-color: #000000;
color: #920000;
padding: 0.2em 1em;
font-size: 12px;
}
#navbar a:hover {
background-color: #920000;
color: #FFFFFF;
width: 100%;
padding: 0.2em 1em;
}
ul#navbar ul {
display: none;
position: absolute;
z-index: 2;
}
ul#navbar ul a:hover {
display: block;
background-color: #920000;
color: #FFFFFF;
width: 100%;
padding: 0.2em 1em;
}
#navbar a {
background-color: #000000;
color: #FFFFFF;
padding: 0.2em 1em;
}
#navbar li {
position: relative;
display: inline;
list-style-type: none;
width: 100%;
color: #FFFFFF;
padding: 0.2em 1em;
}
#navbar li.active a {
background-color: #920000;
color: #FFFFFF;
width: 100%;
padding: 0.2em 1em;
}
.wide { width: 70%; }
.red {
color: #920000;
text-decoration: none;
}
.white {
color: #FFFFFF;
text-decoration: none;
}
.white a {
color: #920000;
text-decoration: none;
}[/code]

[code]<ul id="navbar">
<li class="active"><a href="index.php">Index</a></li>
<li><a href="about.php">About</a></li>
<li><a href="tuts.php">Tutorials</a></li>
<li><a href="portfolio.php">Portfolio</a>
<ul>
<li><a href="sites.php">Sites</a></li>
<li><a href="article.php">Articles</a></li>
<li><a href="poetry.php">Poetry</a></li>
</ul></li>
<li><a href="gaming.php">Gaming</a></li>
<li><a href="contact.php">Contact</a></li>
</ul></div>[/code]

anyone got any idea as to how to fix this? most likely something really easy ive missed, oh well /blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />

thanks[/color]
Image

Image
Josh
Hero Member
Hero Member
Posts: 4627
Joined: Fri Jun 04, 2004 2:54 pm

Horizontal CSS Menu's

Post by Josh »

Why do you have a
at the end of your html? /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
[align=center]

Image

“If you stop learning, you stop living.” ~Tami Quiring

“It's the rare man who understands the value of a single perfect rose.”

[/align]