Template:Team:DukeMenu/CSS

From 2014.igem.org

(Difference between revisions)
 
(73 intermediate revisions not shown)
Line 1: Line 1:
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
-
 
-
<!--THIS STYLE SHEET IS FOR THE MENU-BAR-->
 
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
<style media="screen" type="text/css">
+
<head>
-
/* Makes the square buttons for the menu */     
+
 
-
.sq-menu {
+
 
-
     display:block;
+
<style type="text/css">
-
    height:50px;
+
#navbar ul, #navbar li {  
-
    border:none;
+
     list-style: none;
-
    line-height:50px;
+
     list-style-position:inside;
-
    color:#f5f5f5;
+
     margin:0px 0px;
-
    text-align:center;
+
     padding:0;
-
    text-decoration:none;
+
-
     opacity: 1;
+
-
    background: #0736A4;
+
-
    font-size:16px;
+
-
    font-weight:bold;
+
-
    overflow:hidden;
+
-
    -webkit-transition: all 0.5s ease;
+
-
    -moz-transition: all 0.5s ease;
+
-
    -o-transition: all 0.5s ease;
+
-
/*margins must be half of the change in size*/   
+
-
     margin: 0px;
+
-
     line-height:200%;
+
}
}
-
.sq-menu:hover {
+
#navbar img {
-
     background-color: #0000ff;
+
width:25%;
-
     opacity: 1;
+
height:25%;
-
/* Glow effect */
+
}
-
  -webkit-box-shadow: 0px 0px 20px rgba(7, 54, 164, 0);  
+
 
-
  -moz-box-shadow: 0px 0px 20px rgba(7, 54, 164, 0;  
+
#navbar ul  {
-
  box-shadow: 0px 0px 20px rgba(7, 54, 164, 0);
+
     display:none;
 +
     position:absolute;
 +
    left:0px;
 +
    width:100%;
 +
    background-color:#0736A4;
}
}
-
#menu {}
 
-
.fixed {
+
#navbar li{
-
position:fixed;
+
    float:left;
-
top:0px;
+
    padding:10px 0px;
-
z-index:10;
+
    position:relative;
 +
    width:12.5%; /*originally 16.66%*/
}
}
 +
#navbar > li >ul {
 +
    margin: 10px 0px;
 +
}
 +
 +
#navbar {
 +
    text-align:center;
 +
    height: 43px; /*43px originally*/
 +
    background-color:#0736A4;
 +
    margin: 0px 0px 40px 0px;
 +
    z-index:51;
 +
}
 +
 +
#navbar a {
 +
    text-decoration:none;
 +
    color:white;
 +
    /*font-family:raleway;*/
 +
    font-size:16px;
 +
}
 +
 +
#navbar li li {
 +
    width:100%;
 +
}
</style>
</style>
-
</head>
 
-
<body>
+
</head>
-
<!--width/height of table must equal the sq-menu attributes. consider changing the widths to percentages -->
+
-
<div id="menu">
+
-
<table width="100%" align="center">
+
-
<tr height="50px">
+
-
<td width="50px"><a href="https://2014.igem.org/Team:Duke/Team" class="sq-menu"> <img src="https://static.igem.org/mediawiki/2014/a/aa/Homeicon.png" width="50px" height="50px"  /></a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Team</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://igem.org/Team.cgi">Team Profile</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Project</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Modeling</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Notebook</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Safety</a></td>
+
-
<td width="200px"><a class="sq-menu" href="https://2014.igem.org/Team:Duke">Attributions</a></td>
+
-
<td width="100px"><a class="sq-menu" href="https://2014.igem.org/Main_Page"><img src="https://static.igem.org/mediawiki/2014/1/1a/Mattigemlogowhite.png " alt="Duke iGEM" height="60px" width="60px" /></a></td>
+
-
</tr>
+
-
</table>
+
-
</div>
+
 +
<body>
<script>
<script>
-
$(document).ready(function() {
 
-
  //change the integers below to match the height of your upper dive, which I called
 
-
  //banner.  Just add a 1 to the last number.  console.log($(window).scrollTop())
 
-
  //to figure out what the scroll position is when exactly you want to fix the nav
 
-
  //bar or div or whatever.  I stuck in the console.log for you.  Just remove when
 
-
  //you know the position.
 
-
  $(window).scroll(function () {
 
-
    console.log($(window).scrollTop());
+
$(document).ready(function(){
 +
  $('#navbar > li').hover(function() {
 +
$(this).find('ul').slideToggle("slow");
 +
});
-
    if ($(window).scrollTop() > 550) {
 
-
      $('#menu').addClass('fixed');
 
-
    }
 
-
    if ($(window).scrollTop() < 551) {
+
$('#navbar > li > ul > li').mouseover(function(){
-
      $('#menu').removeClass('fixed');
+
  $(this).css("background-color","#0730D3");
-
    }
+
-
  });
+
});
});
-
</script>
+
 
 +
$('#navbar li').hover(function(){
 +
  $(this).css("background-color","#0736A4");
 +
});
 +
 
 +
 
 +
$('#navbar > li > a').hover(function(){$(this).parent().css("background-color","#0730D3");}, function(){$(this).parent().css("background-color","#0736A4");});
 +
});
 +
  </script>
 +
 
 +
<!-- 0736A4 is duke blue -->
 +
 
 +
 
 +
<ul id="navbar">
 +
        <li><a href="https://2014.igem.org/Team:Duke">Home</a></li>
 +
        <li><a href="https://2014.igem.org/Team:Duke/Team">Team</a>
 +
<ul>
 +
                <li><a href="https://2014.igem.org/Team:Duke/Team">About Us</a></li>
 +
                <li><a href="https://igem.org/Team.cgi?year=2014&amp;team_name=Duke">Official Team Profile</a></li>
 +
                <li><a href="https://2014.igem.org/Team:Duke/Team/Gallery">Photo Gallery</a></li>             
 +
                <li><a href="https://2014.igem.org/Team:Duke/Team/Attributions">Attributions</a></li>           
 +
</ul>
 +
        </li>     
 +
        <li><a href="https://2014.igem.org/Team:Duke/Project">Project</a>
 +
<ul>
 +
  <li><a href="https://2014.igem.org/Team:Duke/Project#background">Background</a></li>             
 +
                <li><a href="https://2014.igem.org/Team:Duke/Project#summary">Summary</a></li>
 +
              <li><a href="https://2014.igem.org/Team:Duke/Modeling">Modeling</a></li>
 +
  <li><a href="https://2014.igem.org/Team:Duke/Project#results">Results</a></li>       
 +
  <li><a href="https://2014.igem.org/Team:Duke/Project#future">Future Directions</a></li>           
 +
   
 +
</ul>
 +
      </li>
 +
      <li><a href="https://2014.igem.org/Team:Duke/Parts">Parts</a></li>
 +
      <li><a href="https://2014.igem.org/Team:Duke/Notebook/Overview">Notebook</a>
 +
<ul>
 +
                <li><a href="https://2014.igem.org/Team:Duke/Notebook/Overview">Overview</a></li>
 +
                <li><a href="https://2014.igem.org/Team:Duke/Notebook/Months">Notebook by Month</a></li>                                                   
 +
        <li><a href="https://2014.igem.org/Team:Duke/Notebook/Protocols">Protocols</a></li>           
 +
</ul>
 +
      </li>
 +
      <li><a href="https://2014.igem.org/Team:Duke/Policy">Policy and Practice</a>
 +
        <ul>
 +
                <li><a href="https://2014.igem.org/Team:Duke/Policy#threed">3D Printing</a></li>             
 +
                <li><a href="https://2014.igem.org/Team:Duke/Policy#hoco">House Course</a></li>             
 +
                <li><a href="https://2014.igem.org/Team:Duke/Policy#smath">NCSSM Team</a></li>             
 +
        </ul>
 +
      </li>       
 +
      <li><a href="https://2014.igem.org/Team:Duke/Safety">Safety</a></li>     
 +
      <li><a href="https://2014.igem.org/"><img src = "https://static.igem.org/mediawiki/2014/1/1a/Mattigemlogowhite.png"></a></li>     
 +
 
 +
<div style="clear: both;"></div>
 +
</ul>
 +
 
</body>
</body>
</html>
</html>

Latest revision as of 02:49, 18 October 2014