Team:TU-Delft
From 2011.igem.org
(Difference between revisions)
Line 47: | Line 47: | ||
float:left; | float:left; | ||
} | } | ||
+ | |||
+ | /*style the main menu*/ | ||
+ | .myMenu { | ||
+ | margin:0; | ||
+ | padding:0; | ||
+ | } | ||
+ | |||
+ | .myMenu li { | ||
+ | list-style:none; | ||
+ | float:left; | ||
+ | font:12px Arial, Helvetica, sans-serif #111; | ||
+ | } | ||
+ | |||
+ | .myMenu li a:link, .myMenu li a:visited { | ||
+ | display:block; | ||
+ | text-decoration:none; | ||
+ | background-color:#09F; | ||
+ | padding: 0.5em 2em; | ||
+ | margin:0; | ||
+ | border-right: 1px solid #fff; | ||
+ | color:#111; | ||
+ | } | ||
+ | |||
+ | .myMenu li a:hover { | ||
+ | background-color:#0CF; | ||
+ | } | ||
+ | |||
+ | /*style the sub menu*/ | ||
+ | .myMenu li ul { | ||
+ | position:absolute; | ||
+ | visibility:hidden; | ||
+ | border-top:1px solid #fff; | ||
+ | margin:0; | ||
+ | padding:0; | ||
+ | } | ||
+ | |||
+ | .myMenu li ul li { | ||
+ | display:inline; | ||
+ | float:none; | ||
+ | } | ||
+ | |||
+ | .myMenu li ul li a:link, .myMenu li ul li a:visited { | ||
+ | background-color:#09F; | ||
+ | width:auto; | ||
+ | } | ||
+ | |||
+ | .myMenu li ul li a:hover { | ||
+ | background-color:#0CF; | ||
+ | } | ||
+ | |||
</style> | </style> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $('.myMenu > li').bind('mouseover', openSubMenu); | ||
+ | $('.myMenu > li').bind('mouseout', closeSubMenu); | ||
+ | |||
+ | function openSubMenu() { | ||
+ | $(this).find('ul').css('visibility', 'visible'); | ||
+ | }; | ||
+ | |||
+ | function closeSubMenu() { | ||
+ | $(this).find('ul').css('visibility', 'hidden'); | ||
+ | }; | ||
+ | |||
+ | }); | ||
+ | </script> | ||
+ | |||
<div id="TU-wrapper"> | <div id="TU-wrapper"> | ||
<div id="TU-header"> | <div id="TU-header"> | ||
Line 53: | Line 119: | ||
</div> | </div> | ||
<div id="TU-menu"> | <div id="TU-menu"> | ||
- | <ul> | + | <ul class="myMenu"> |
- | <li>Home</li> | + | <li><a href="#">Home</a></li> |
- | <li>Test<ul><li>Test2</li></ul></li> | + | <li><a href="#">Test</a><ul><li><a href="#">Test2</a></li></ul></li> |
</ul> | </ul> | ||
</div> | </div> |
Revision as of 19:34, 18 May 2011
TU Delft