Team:Calgary/Sandbox
From 2012.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | <!-- | ||
+ | This version is now trying to add a compound mega/mobile dropdown nav menu. Viewports for mobile should, for the most part, be working properly at this point. | ||
+ | --> | ||
<head> | <head> | ||
<!-- | <!-- | ||
Line 11: | Line 14: | ||
<style> | <style> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
/*Base styles*/ | /*Base styles*/ | ||
Line 48: | Line 37: | ||
only screen and (max-device-width: 480px){ | only screen and (max-device-width: 480px){ | ||
+ | /***Global Adjustments***/ | ||
div#top-section, div#footer-box, div#footer, div#content, div#f-list, ul#f-list{ | div#top-section, div#footer-box, div#footer, div#content, div#f-list, ul#f-list{ | ||
width: 95%; | width: 95%; | ||
Line 67: | Line 57: | ||
overflow-x: hidden; | overflow-x: hidden; | ||
} | } | ||
- | + | ||
- | + | /***End Global Adjustments***/ | |
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | |||
+ | /***Nav styling***/ | ||
+ | #nav{ | ||
+ | list-style: none; | ||
+ | width: 16%; | ||
+ | margin: 0px 10px 0px 10px; | ||
+ | padding: 20px; | ||
+ | text-indent: 0; | ||
+ | |||
+ | /*Background colours*/ | ||
+ | background: #202020; | ||
+ | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#202020', endColorstr='#333333'); /* for IE 6+7*/ | ||
+ | -ms-filter: | ||
+ | "progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#202020', endColorstr='#333333')"; /* for IE 8*/ | ||
+ | background: -webkit-gradient(linear, left top, right bottom, from(#202020), to(#333333)); /* for webkit browsers */ | ||
+ | background: -moz-linear-gradient(left, #202020, #333); /* for firefox 3.6+ */ | ||
+ | } | ||
+ | #menu-icon{ | ||
+ | display: none; | ||
+ | } | ||
+ | #nav li{ | ||
+ | height: auto; | ||
+ | padding: 0; | ||
+ | } | ||
+ | #nav li a{ | ||
+ | display: block; | ||
+ | font-family: Myriad Pro, Gill Sans MT, Trebuchet MS, Arial, Sans-Serif; | ||
+ | font-size: 1.8em; | ||
+ | color: white; | ||
+ | line-height: 40px; /*centers the text vertically*/ | ||
+ | } | ||
+ | /*arrows to signify dropout menus*/ | ||
+ | #nav li a.drop:after{ | ||
+ | content: '>'; | ||
+ | color: #BBB; | ||
+ | display: inline; | ||
+ | float: right; | ||
+ | } | ||
+ | #nav li a:hover, #nav li a:hover::after{ | ||
+ | display: block; | ||
+ | text-decoration: none; | ||
+ | color: #43bbff; | ||
+ | } | ||
+ | /***End nav styling***/ | ||
/*Desktop styles*/ | /*Desktop styles*/ | ||
Line 84: | Line 118: | ||
font-size: 1.5em; | font-size: 1.5em; | ||
} | } | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | |||
</style> | </style> | ||
+ | |||
+ | <!--Mobile nav from http://webdesignerwall.com/tutorials/mobile-navigation-design-tutorial--> | ||
+ | <script type="text/javascript"> | ||
+ | jQuery(document).ready(function($){ | ||
+ | |||
+ | /* prepend menu icon */ | ||
+ | $('#nav-wrap').prepend('<div id="menu-icon">Menu</div>'); | ||
+ | |||
+ | /* toggle nav */ | ||
+ | $("#menu-icon").on("click", function(){ | ||
+ | $("#nav").slideToggle(); | ||
+ | $(this).toggleClass("active"); | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | </script> | ||
+ | |||
</head> | </head> | ||
<body> | <body> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | <div id=" | + | <div id="nav-wrap"> |
- | </ | + | <ul id="nav"> |
- | + | <li><a href="#">Home</a></li> | |
- | < | + | <li><a class="drop" href="#">Team</a> |
+ | <div> | ||
+ | </div> | ||
+ | </li> | ||
+ | <li><a class="drop" href="#">Project</a></li> | ||
+ | <div> | ||
+ | </div> | ||
+ | <li><a href="#">Parts</a></li> | ||
+ | <li><a class="drop" href="#">Notebook</a></li> | ||
+ | <div> | ||
+ | </div> | ||
+ | <li><a class="drop" href="#">Outreach</a></li> | ||
+ | <div> | ||
+ | </div> | ||
+ | <li><a href="#">Sponsors</a></li> | ||
+ | <li><a href="#">iGEM Home</a></li> | ||
+ | </ul> | ||
+ | </div> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 17:13, 22 June 2012