Difference between revisions of "Template:Manchester/CSS"

m
m
Line 6: Line 6:
 
/********************************* menu bar formatting ********************************/
 
/********************************* menu bar formatting ********************************/
  
menu_ul {
+
#nav{
 +
    margin:100px auto;
 +
    width:500px;
 +
}
 +
 
 +
#nav ul {
 
     margin: -15px;
 
     margin: -15px;
 
     overflow: hidden;
 
     overflow: hidden;
Line 15: Line 20:
 
     font-size:20px;
 
     font-size:20px;
 
}
 
}
menu_li {
+
#nav ul li {
 
     float: left;
 
     float: left;
 
     https://2016.igem.org/Team:Manchester
 
     https://2016.igem.org/Team:Manchester
Line 21: Line 26:
  
  
menu_li a {
+
#nav ul li a {
 
     display: inline;
 
     display: inline;
 
     color: white;
 
     color: white;
Line 30: Line 35:
 
}
 
}
  
menu_li a:hover:not(.active) {
+
#nav ul li a:hover{
     background-color: #111;
+
    color:white;
 +
     background-color:purple;
 
}
 
}
  
.active {
+
#nav ul li .active {
 
     background-color: #4CAF50;
 
     background-color: #4CAF50;
 
}
 
}
 +
 
/********************************* Hyperlink formitting********************************/
 
/********************************* Hyperlink formitting********************************/
 
a:link {
 
a:link {
Line 176: Line 183:
 
$(function() {
 
$(function() {
 
     var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1);
 
     var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1);
     $("#menu_li a").each(function(){
+
     $("#nav ul li a").each(function(){
 
           if($(this).attr("href") == pgurl || $(this).attr("href") == '' )
 
           if($(this).attr("href") == pgurl || $(this).attr("href") == '' )
 
           $(this).addClass("active");
 
           $(this).addClass("active");
Line 193: Line 200:
  
  
<menu_ul>
+
<ul>
  
   <menu_li><a href="https://2016.igem.org/Team:Manchester"><strong>Home</strong></a></menu_li>
+
   <li><a href="https://2016.igem.org/Team:Manchester"><strong>Home</strong></a></li>
   <menu_li><a href="https://2016.igem.org/Team:Manchester/Team"><strong>Team</strong></a></menu_li>
+
   <li><a href="https://2016.igem.org/Team:Manchester/Team"><strong>Team</strong></a></li>
   <menu_li><a href="https://2016.igem.org/Team:Manchester/Description"><strong>Project</strong></a></menu_li>
+
   <li><a href="https://2016.igem.org/Team:Manchester/Description"><strong>Project</strong></a></li>
  
</menu_ul>
+
</ul>
  
 
</body>
 
</body>

Revision as of 15:48, 12 July 2016