Team:Valencia/navbar

From 2010.igem.org

(Difference between revisions)
Line 17: Line 17:
<style>
<style>
 +
 +
/* Menu from http://www.sohtanaka.com/web-design/examples/horizontal-subnav/ */
 +
#tab_nav {
 +
position: absolute;
 +
z-index: 1000;
 +
}
ul#topnav {
ul#topnav {
-
margin: 0; padding: 0;
 
float: left;
float: left;
-
width: 970px;
+
width: 900px;
list-style: none;
list-style: none;
-
position: relative; /*--Set relative positioning on the unordered list itself - not on the list item--*/
+
position: relative;
-
font-size: 1.2em;
+
background: url("https://static.igem.org/mediawiki/2010/8/80/Groningen_topnav_stretch.gif") repeat-x;
-
background: url(topnav_stretch.gif) repeat-x;
+
}
}
ul#topnav li {
ul#topnav li {
float: left;
float: left;
-
margin: 0; padding: 0;
+
border-right: 1px solid #555;
-
border-right: 1px solid #555; /*--Divider for each parent level links--*/
+
}
}
ul#topnav li a {
ul#topnav li a {
padding: 10px 15px;
padding: 10px 15px;
 +
font-weight: bold;
display: block;
display: block;
color: #f0f0f0;
color: #f0f0f0;
text-decoration: none;
text-decoration: none;
}
}
-
ul#topnav li:hover { background: #1376c9 url(topnav_active.gif) repeat-x; }
+
ul#topnav li a:hover {
-
/*--Notice the hover color is on the list item itself, not on the link. This is so it can stay highlighted even when hovering over the subnav--*/
+
      text-decoration: underline;
 +
}
 +
ul#topnav li:hover { background: #b5cc86 url("https://static.igem.org/mediawiki/2010/2/29/Groningen_topnav_active.gif") repeat-x; }
ul#topnav li span {
ul#topnav li span {
float: left;
float: left;
padding: 15px 0;
padding: 15px 0;
position: absolute;
position: absolute;
-
left: 0; top:35px;
+
left: 0; top:30px;
-
display: none; /*--Hide by default--*/
+
display: none;
-
width: 970px;
+
width:900px;
-
background: #1376c9;
+
background: #b5cc86;
color: #fff;
color: #fff;
-
/*--Bottom right rounded corner--*/
 
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomright: 5px;
-khtml-border-radius-bottomright: 5px;
-khtml-border-radius-bottomright: 5px;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-
/*--Bottom left rounded corner--*/
 
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomleft: 5px;
-khtml-border-radius-bottomleft: 5px;
-khtml-border-radius-bottomleft: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
}
-
ul#topnav li:hover span { display: block; } /*--Show subnav on hover--*/
+
ul#topnav li:hover span { display: block; }
-
ul#topnav li span a { display: inline; } /*--Since we declared a link style on the parent list link, we will correct it back to its original state--*/
+
ul#topnav li span a { display: inline;  font-weight; normal; }
ul#topnav li span a:hover {text-decoration: underline;}
ul#topnav li span a:hover {text-decoration: underline;}
 +
 +
</style>
</style>

Revision as of 11:10, 23 October 2010