Template:Team:Berkeley/header

From 2013.igem.org

(Difference between revisions)
Line 5: Line 5:
  <style type='text/css'>
  <style type='text/css'>
-
body {
+
 
-
  background-color: #333; 
+
-
  color: #999;
+
-
  font: 12px/1.4em Arial,sans-serif;
+
-
}
+
-
#wrap {
+
-
  margin: 10px auto;       
+
-
  background: #666;
+
-
  padding: 10px;
+
-
  width: 700px;
+
-
}
+
-
#header {
+
-
  background-color: #666;
+
-
  color: #FFF;
+
-
}
+
-
#logo {
+
-
  font-size: 30px; 
+
-
  line-height: 40px;   
+
-
  padding: 5px;
+
-
}
+
#navWrap {
#navWrap {
   height: 30px;
   height: 30px;
-
}
 
-
#nav {
 
-
  padding: 5px;
 
-
  background: #999;   
 
-
}
 
-
#nav ul {
 
-
  margin: 0;
 
-
  padding: 0;   
 
-
}
 
-
#nav li {
 
-
  float: left;
 
-
  padding: 3px 8px;
 
-
  background-color: #FFF;
 
-
  margin: 0 10px 0 0;
 
-
  color: #F00;
 
-
  list-style-type: none;
 
-
}
 
-
#nav li a {
 
-
  color: #F00; 
 
-
  text-decoration: none;   
 
-
}
 
-
#nav li a:hover {
 
-
  text-decoration: underline; 
 
}
}
br.clearLeft {
br.clearLeft {
Line 56: Line 14:
</style>
</style>
-
 
-
<script type='text/javascript'>
 
-
//<![CDATA[
 
-
 
-
$(function() {
 
-
    // Stick the #nav to the top of the window
 
-
    var nav = $('#nav');
 
-
    var navHomeY = nav.offset().top;
 
-
    var isFixed = false;
 
-
    var $w = $(window);
 
-
    $w.scroll(function() {
 
-
        var scrollTop = $w.scrollTop();
 
-
        var shouldBeFixed = scrollTop > navHomeY;
 
-
        if (shouldBeFixed && !isFixed) {
 
-
            nav.css({
 
-
                position: 'fixed',
 
-
                top: 0,
 
-
                left: nav.offset().left,
 
-
                width: nav.width()
 
-
            });
 
-
            isFixed = true;
 
-
        }
 
-
        else if (!shouldBeFixed && isFixed)
 
-
        {
 
-
            nav.css({
 
-
                position: 'static'
 
-
            });
 
-
            isFixed = false;
 
-
        }
 
-
    });
 
-
});
 
-
 
-
 
-
//]]> 
 
-
</script>
 
     <meta property="og:title" content="Berkeley iGEM 2013"/>
     <meta property="og:title" content="Berkeley iGEM 2013"/>

Revision as of 21:40, 21 October 2013