Horizontal CSS Menu's
Posted: Sun Jan 29, 2006 12:55 pm
[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 <img src=\'http://www.killanet.net/forum3/public/s ... >/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 <img src=\'http://www.killanet.net/forum3/public/s ... >/blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />
thanks[/color]
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 <img src=\'http://www.killanet.net/forum3/public/s ... >/blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />
thanks[/color]