The (X.)H.T.M.L. Structure Layer Code
This is the markup code employed to build the navigation div container on the left side of each page.
-
/* navigation div container markup code - includes all child elements */ -
-
<div id="nav">
-
<h4 class="skip">
-
<a href="#a1">skip to content</a></h4>
-
<hr>
-
<h4 title="Hyperlink states.">link state symbols</h4>
-
<ul class="linkstate">
-
<li class="hover"><img alt="Ball symbol." class="state" src="images/hover.gif" width="16" height="16">Focus/Hover</li>
-
<li class="unvisited"><img alt="Chain link symbol." class="state" src="images/link.gif" width="16" height="16">Unvisited</li>
-
<li class="visited"><img alt="Check mark symbol." class="state" src="images/visited.gif" width="16" height="16">Visited</li>
-
<li class="currently"><img alt="Star symbol." class="state" src="images/star.gif" width="16" height="16">Currently Open</li>
-
</ul>
-
<hr>
-
<h4>topics</h4>
-
<ul class="linkstate">
-
<li><a href="home.htm">Home</a>
-
<ul>
-
<li><a href="GettingStarted.htm">Getting Started</a></li>
-
<li><span class="navcontainer linkstate"><a href="Nav.htm" title="This page is currently open.">NAV Container</a></span>
-
<ul>
-
<li><a href="Skip.htm">Skip to Content Section</a></li>
-
<li><a href="hr.htm">Horizontal Rule Section</a></li>
-
<li><a href="LinkStates.htm">Link State Symbols Section</a></li>
-
<li><a href="Topics.htm">Topics Section</a></li>
-
<li><a href="Guide.htm">Help Authoring Section</a></li>
-
<li><a href="SectionHeading.htm">Section Heading Code</a></li>
-
<li><a href="CurrentlyOpen.htm">Currently Open Code</a></li>
-
</ul>
-
</li>
-
<li><a href="Acknowledgements.htm">Acknowledgements</a></li>
-
<li><a href="References.htm">References</a></li>
-
<li><a href="DesignNotes.htm">Design Notes</a></li>
-
</ul>
-
</li>
-
</ul>
-
<hr>
-
<h4 class="norm">A Help Authoring Guide</h4>
-
</div>
-
-
/* end navigation div container markup code - includes all child elements */
The C.S.S. Presentation Layer Code
Here we employ the C.S.S. Liquid Box Model to position and style the Navigation div container in the browser window:
The presentation code is defined as follows:
- div id="nav"
- width: 23em; - gives the navigation div container a relative horizontal size
- position: absolute; - removes the navigation div container from the natural flow of the document.
- top: 1em; - sets the distance from the top of the browser window
- left: 1em; - sets the distance from the left side of the browser window
- margin: 0em; - shorthand margin property code - removes all margins in the following order: top, right, bottom, left
-
padding: 0em 0.5em 1em 0.5em; - shorthand code for the padding as such:
- pading-top: 0em; - sets the top padding to 0em
- padding-right: 0.5em; - sets the right padding to 0.5em
- padding-bottom: 1em; - sets the bottom padding to 1em
- padding-left: 0.5em; - sets the left padding to 0.5em
-
border: 1px solid #ffd505; - shorthand code for the border - defines the colored border around the nav container:
- border-width: 0.1em; - sets the width of the border
- border-style: solid; - sets the style of the border
- border-color: #ffd505; - sets the color of the border
- #nav ul
- margin: 0em; - margin shorthand code - removes all margins in the following order: top, right, bottom, left
- padding: 0em; - padding shorthand code: removes all padding in the following order: top, right, bottom, left
- list-style-type: none; - removes the list-styles: discs, squares, circles, etc.
- color: #fff; - sets the color of white to the text characters
- background: inherit - sets the list to inherit the container background color
- #nav ul li
- margin: 0em; - remove all margins from the list items in the following order: top, right, bottom, left
-
padding: 0.4em 0em 0em 0.5em; - shorthand for the padding:
- padding-top: 0.4em; - sets the top padding to 0.4em
- padding-right: 0em; - sets the right padding to 0em
- padding-bottom: 0em; - sets the bottom padding to 0em
- padding-left: 0.5em; - sets the left padding to 0.5em
- list-style-type: none; - removes the list-styles: discs, squares, circles, etc.
- #nav ul ul li
- padding: 0em; - shorthand for the padding - removes all padding in the following order: top, right, bottom, left
- margin-left: 2em; - sets the left margin padding to 2em
- list-style-type: disc; - sets the list-style-type to a disc
- #nav ul ul ul li
- padding: 0em; - shorthand for the padding - removes all padding in the following order: top, right, bottom, left
- margin-left: 1.4em; - sets the left margin padding to 1.4em
- list-style-type: circle; - sets the list-style-type to a circle
The CSS code:
-
/* navigation div container presentation code */ -
-
#nav { -
width: 23em;
-
position: absolute;
-
top: 1em;
-
left: 1em;
-
margin: 0em;
-
padding: 0em 0.5em 1em 0.5em
-
background: inherit;
-
color: #000;
-
border: 0.1em solid #ffd505; }
-
-
#nav ul { -
margin: 0em;
-
padding: 0em;
-
list-style-type: none;
-
color: #fff;
-
background-color: inherit; }
-
-
#nav ul li { -
margin: 0em;
-
padding: 0.4em 0em 0em 0.5em;
-
list-style-type: none; }
-
-
#nav ul ul li { -
padding: 0em;
-
margin-left: 2em;
-
list-style-type: disc; }
-
-
#nav ul ul ul li { -
padding: 0em;
-
margin-left: 1.4em;
-
list-style-type: circle;
-
-
/* end navigation div container presentation code */