Fixed issue in the navigation bar of not showing it horizontally. All style sheets tested and working with menus.

svn: r18731
This commit is contained in:
Rob G. Healey 2012-01-10 07:10:29 +00:00
parent 991363e8e7
commit ee8c763b8c
10 changed files with 136 additions and 154 deletions

View File

@ -1591,24 +1591,14 @@ class BasePage(object):
# Remove menu sections if they are not being created?
navs = ((u, n) for u, n, c in navs if c)
menu_items = [[url, text] for url, text in navs]
number_items = len(menu_items)
num_cols = 10
num_rows = (number_items // num_cols) + 1
# begin navigation menu division...
with Html("div", id ="nav") as navigation:
# navigation += Html("nav", role = "navigation", inline = True)
with Html("div", id ="nav", role = "Navigation") as navigation:
index = 0
for rows in range(num_rows):
unordered = Html("ul")
navigation += unordered
cols = 0
while (cols <= num_cols and index < number_items):
url_fname, nav_text = menu_items[index]
for (url_fname, nav_text) in navs:
if not _has_webpage_extension(url_fname):
url_fname += self.ext
@ -1660,8 +1650,6 @@ class BasePage(object):
unordered.extend(
Html("li", hyper, inline = True)
)
index += 1
cols += 1
return navigation
def add_image(self, option_name, height = 0):

View File

@ -125,13 +125,13 @@ a[href]:hover, a[href]:active {
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
div#nav, #subnavigation {
border: solid 1px #EEE; /* needed by IE7 */
}
#subnavigation ul {
overflow: hidden;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style: none;
margin: 0px;
padding-left: 15px;
@ -139,22 +139,22 @@ a[href]:hover, a[href]:active {
#subnavigation ul {
border-bottom: solid 1px #999;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
font-size: smaller;
font-weight: bold;
padding: 5px;
border-bottom: solid 1px #EEE;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #CCC;
border-bottom: solid 1px black;
}
#navigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a {
position: relative;
top: 1px;
border: solid 1px #999;
@ -166,10 +166,10 @@ a[href]:hover, a[href]:active {
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
div#alphanav {
background-color: #EEE;
}
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -179,21 +179,21 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: black;
color: white;

View File

@ -52,6 +52,7 @@ body {
background-color: #00029D;
color: #00029D;
width: 100%;
padding: 0px 14px;
}
div {
margin: 0;

View File

@ -125,13 +125,13 @@ a[href]:hover, a[href]:active {
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
div#nav, #subnavigation {
border: solid 1px #454; /* needed by IE7 */
}
#subnavigation ul {
overflow: hidden;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style: none;
margin: 0px;
padding-left: 15px;
@ -139,10 +139,10 @@ a[href]:hover, a[href]:active {
#subnavigation ul {
border-bottom: solid 1px #7C8F7C;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
font-size: smaller;
font-weight: bold;
@ -150,12 +150,12 @@ a[href]:hover, a[href]:active {
padding: 5px;
border-bottom: solid 1px #454;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #9DBF9D;
border-bottom: solid 1px black;
}
#navigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a {
position: relative;
top: 1px;
color: #454;
@ -169,10 +169,10 @@ a[href]:hover, a[href]:active {
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
div#alphanav {
background-color: #454
}
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -182,22 +182,22 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
color: white;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: black;
color: white;

View File

@ -126,13 +126,13 @@ a[href]:hover, a[href]:active {
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
div#nav, #subnavigation {
border: solid 1px #E0E0E9; /* needed by IE7 */
}
#subnavigation ul {
overflow: hidden;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style: none;
margin: 0px;
padding-left: 15px;
@ -140,22 +140,22 @@ a[href]:hover, a[href]:active {
#subnavigation ul {
border-bottom: solid 1px #669;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
font-size: smaller;
font-weight: bold;
padding: 5px;
border-bottom: solid 1px #E0E0E9;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #B4B4CB;
border-bottom: solid 1px black;
}
#navigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a {
position: relative;
top: 1px;
border: solid 1px #669;
@ -168,10 +168,10 @@ a[href]:hover, a[href]:active {
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
div#alphanav {
background-color: #E0E0E9;
}
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -181,21 +181,21 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: black;
color: #FAFAFF;

View File

@ -126,13 +126,13 @@ a[href]:hover, a[href]:active {
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
div#nav, #subnavigation {
border: solid 1px #FFE09F; /* needed by IE7 */
}
#subnavigation ul {
overflow: hidden;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style: none;
margin: 0px;
padding-left: 15px;
@ -140,22 +140,22 @@ a[href]:hover, a[href]:active {
#subnavigation ul {
border-bottom: solid 1px #8C581C;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
font-size: smaller;
font-weight: bold;
padding: 5px;
border-bottom: solid 1px #FFE09F;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #FFC35E;
border-bottom: solid 1px #36220B;
}
#navigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a {
position: relative;
top: 1px;
border: solid 1px #8C581C;
@ -168,10 +168,10 @@ a[href]:hover, a[href]:active {
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
div#alphanav {
background-color: #FFE09F;
}
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -181,21 +181,21 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: #36220B;
color: #FFFBE7;

View File

@ -126,13 +126,13 @@ a[href]:hover, a[href]:active {
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
div#nav, #subnavigation {
border: solid 1px #EAEEF4; /* needed by IE7 */
}
#subnavigation ul {
overflow: hidden;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style: none;
margin: 0px;
padding-left: 15px;
@ -140,22 +140,22 @@ a[href]:hover, a[href]:active {
#subnavigation ul {
border-bottom: solid 1px #7CA3DD;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
font-size: smaller;
font-weight: bold;
padding: 5px;
border-bottom: solid 1px #EAEEF4;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #BFD0EA;
border-bottom: solid 1px black;
}
#navigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a {
position: relative;
top: 1px;
border: solid 1px #7CA3DD;
@ -168,10 +168,10 @@ a[href]:hover, a[href]:active {
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
div#alphanav {
background-color: #EAEEF4;
}
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -181,21 +181,21 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: black;
color: #FFF;

View File

@ -27,13 +27,7 @@ Style Name: Web_Navigation-Horizontal.css
# $Id$
Body Element
---------------------------------------------------=== */
body {
padding: 0px 14px;
}
/* Navigation Menus
Navigation Menus
----------------------------------------------------- */
div#nav {
clear: both;

View File

@ -132,28 +132,28 @@ a[href]:hover, a[href]:active {
/* Navigation
-----------------------------------------------------------------*/
#navigation, #subnavigation {
div#nav, #subnavigation {
background: url(../images/Web_Mainz_MidLight.png) #FFF2C6 repeat;
}
#navigation ul, #subnavigation ul {
div#nav ul, #subnavigation ul {
list-style-type: none;
margin: 0px;
padding-left: 0px;
}
#navigation ul li, #subnavigation ul li {
div#nav ul li, #subnavigation ul li {
float: left;
}
#navigation ul li a, #subnavigation ul li a {
div#nav ul li a, #subnavigation ul li a {
display: block;
padding: 0.4em 0.8em 0.3em 0.8em;
font-size: smaller;
font-family: sans-serif;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
div#nav ul li a:hover, #subnavigation ul li a:hover {
text-decoration: none;
background-color: #FFFFE7;
}
#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
font-weight: bold;
font-style: italic;
background-image: url(../images/Web_Mainz_Mid.png);
@ -167,7 +167,7 @@ a[href]:hover, a[href]:active {
/* Alphabet Navigation
-----------------------------------------------------------------*/
#alphabet ul {
div#alphanav ul {
list-style: none;
border-width: 2px 0px 4px 0px;
border-style: solid;
@ -176,23 +176,23 @@ a[href]:hover, a[href]:active {
/* float container stretch, see www.quirksmode.org/css/clearing.html */
overflow: hidden;
}
#alphabet ul li {
div#alphanav ul li {
float: left;
font-size: larger;
font-family: sans-serif;
font-weight: bold;
}
#alphabet ul li:after {
div#alphanav ul li:after {
content: " |";
}
#alphabet ul li a {
div#alphanav ul li a {
display: block;
padding: 4px 8px;
line-height: 100%;
float: left;
color: black;
}
#alphabet ul li a:hover {
div#alphanav ul li a:hover {
text-decoration: none;
background-color: black;
color: white;

View File

@ -207,29 +207,29 @@ p#user_header {
/* Alphabet and Navigation Menus
----------------------------------------------------- */
div#alphabet, div#navigation, div#subnavigation {
div#alphanav, div#nav, div#subnavigation {
width: 100%;
margin: 0;
background-color: #A97;
}
div#alphabet ul, div#navigation ul, div#subnavigation ul {
div#alphanav ul, div#nav ul, div#subnavigation ul {
list-style: none;
min-width: 770px;
height: 24px;
margin: 0;
padding: 0px 0px 0px 16px;
border-width: 2px 0px 4px 0px;
border-width: 2px 0px 1px 0px;
border-style: solid;
border-color: #000;
}
div#alphabet ul li:after, div#navigation ul li:after, div#subnavigation ul li:after {
div#alphanav ul li:after, div#nav ul li:after, div#subnavigation ul li:after {
content: " |";
}
div#alphabet ul li, div#navigation ul li, div#subnavigation ul li {
div#alphanav ul li, div#nav ul li, div#subnavigation ul li {
margin: 0;
float: left;
}
div#alphabet ul li a, div#navigation ul li a, div#subnavigation ul li a {
div#alphanav ul li a, div#nav ul li a, div#subnavigation ul li a {
display: block;
padding: 4px 8px 4px 8px;
float: left;
@ -238,18 +238,17 @@ div#alphabet ul li a, div#navigation ul li a, div#subnavigation ul li a {
text-decoration: none;
color: #000;
}
div#alphabet ul li a:hover, div#navigation ul li a:hover, div#subnavigation ul li a:hover {
div#alphanav ul li a:hover, div#nav ul li a:hover, div#subnavigation ul li a:hover {
background-color: #000;
color: #FFF;
}
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
div#nav ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
padding: 4px 2px 3px 2px;
border-right: solid 1px #542;
border-left: solid 1px #542;
border-bottom: solid 2px #5D835F;
background-color: #F2F6EE;
}
div#navigation ul li.CurrentSection a:hover {
div#nav ul li.CurrentSection a:hover {
background-color: #5D835F;
color: #FFF;
}
@ -510,16 +509,16 @@ div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ol.Col1 {
list-style-type: decimal-leading-zero;
list-style-type: decimal
}
div#SourceCitationReferents ol.Col2 {
list-style-type: upper-alpha;
list-style-type: upper-alpha
}
div#SourceCitationReferents ol.Col3 {
list-style-type: lower-alpha;
list-style-type: lower-alpha
}
div#SourceCitationReferents ol.Col4 {
list-style-type: upper-roman;;
list-style-type: square
}