|
Dale's Computer Art Navigation Bars - Part 2Text-Based Navigation Bars Using CSS...
|
#navh{background-color:silver;width:8em;border:solid 1px gray}
#navh ul{list-style-type:none;margin:0;padding:0;border:none}
#navh li{display:block;margin:0;padding:0.25em 0.5em 0.25em 1em;width:100%;border-top:1px solid gray}
html>body #navh li{width:auto}
#navh li:first-child{border:none}
From: http://www.hotdesign.com/seybold/22navbars.html
This vertical version of the same navigation bar calls an external style sheet named navbarv.css that is linked to this page using:
<link href="navbarh.css" rel="stylesheet" type="text/css" media="all">
Put your UL list inside the following:
<div id="navv">
(UL LIST OF LINKS)
</div>
and it will look like this:
#navv{margin-top:1em;margin-bottom:0.5em}
#navv ul{background-color:silver;text-align:center;margin-left:0;padding-left:0;border-bottom:1px solid gray}
#navv li{list-style-type:none;display:inline;padding:0.25em 1em;border-left:1px solid white}
#navv li:first-child{border:none}
From: http://www.alistapart.com/articles/taminglists/
The web link above explains the css code for this rollover effect and also shows how to do several kinds of more basic horizontal nav bars using CSS
A standard UL containing links can be used to create a dynamic menu with hover effects. In order to obtain the hover effects the UL provides the structure, and the anchor styles provides most of the visual effect.
This vertical version of the same navigation bar calls an external style sheet named navbutton.css that is also linked to this page using:
<link href="navbutton.css" rel="stylesheet" type="text/css" media="all">
Put an unordered list (UL) inside the following HTML code:
<div id="button">
(UL LIST OF LINKS)
</div>
and it will look like this:
#button {
width: 12em;
border-right: 1px solid #000;
padding: 0 0 1em 0;
margin-bottom: 1em;
font-family: 'Trebuchet MS', 'Lucida Grande',
Verdana, Lucida, Geneva, Helvetica,
Arial, sans-serif;
background-color: #90bade;
color: #333;
}
#button ul {
list-style: none;
margin: 0;
padding: 0;
border: none;
}
#button li {
border-bottom: 1px solid #90bade;
margin: 0;
}
#button li a {
display: block;
padding: 5px 5px 5px 0.5em;
border-left: 10px solid #1958b7;
border-right: 10px solid #508fc4;
background-color: #2175bc;
color: #fff;
text-decoration: none;
width: 100%;
}
html>body #button li a {
width: auto;
}
#button li a:hover {
border-left: 10px solid #1c64d1;
border-right: 10px solid #5ba3e0;
background-color: #2586d7;
color: #fff;
}
***
THE List site - Listmania: http://css.maxdesign.com.au/listamatic/index.htm
General Overview of HTML Lists: http://www.tutorials4u.com/html/tutorial-08-list.htm
CSS Specifications Box Properties: http://www.htmlhelp.org/reference/css/box/#padding
Great site for taking CSS lists to the max: http://css.maxdesign.com.au/listamatic/
See Styling Lists links on: http://css-discuss.incutio.com/
CSS and Lists: http://www.w3schools.com/css/css_list.asp