Team:Uppsala/navbar.css

From 2014.igem.org

(Difference between revisions)
 
(191 intermediate revisions not shown)
Line 1: Line 1:
-
/* Navbar code begins */
+
@font-face {
-
nav {
+
    font-family: DeliciousRoman, Helvetica, Arial, sans-serif;
-
+
    src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
-
display: block;
+
    font-weight:400;
-
width: 100%;
+
-
margin-left: auto;
+
-
margin-right: auto;
+
-
        background: white;
+
-
+
}
}
-
nav ul ul {
+
/* ------- Font size dynamic with resolution ------- */
-
display: none;
+
-
}
+
-
nav ul li:hover > ul {
 
-
display: block;
 
-
}
 
-
nav ul {
+
/* ------- Nav-bar ----------- */
 +
 
 +
#menu_container {
 +
 
 +
clear: both;
 +
width:100%;
 +
max-width: 1920px;
 +
min-width: 1100px;
 +
margin-right: auto;
 +
margin-left: auto;
-
background: red;
 
-
width:100%;
 
-
list-style: none;
 
-
position: relative;
 
-
display: inline-table;
 
}
}
-
nav ul:after {
 
-
content: ""; clear: both; display: block;
 
-
}
 
-
nav ul li {
+
.clear {             
-
         width:12.5%;
+
clear: both; /* Vettefan varför man behöver en tom div som bara clearar, allting fuckade upp utan denna */
 +
}
 +
 
 +
#middle_logo {
 +
         position: relative;
 +
width: 20%;
 +
height: 0px;
 +
border-top: 55px solid black;
float: left;
float: left;
-
padding: 0;
+
}
-
margin: 0;
+
 
 +
.home_logo {
 +
position: absolute;
 +
top: -130px;
 +
left: 50%;
 +
margin-left: -125px;
 +
width: 250px;
 +
height: 187px;
}
}
-
nav ul li:hover {
 
-
background: #4b545f;
 
-
}
+
#menu {
-
nav ul li:hover a {
+
  background: #000;
-
color: #fff;
+
  height: 46px;
-
}
+
  max-height:46px;
-
+
  text-align: center;
-
nav ul li a {
+
  font-family: "Times New Roman", Times, serif;
-
display: block; padding: 17px 24.45px;
+
  font-size: 18px;
-
color: #fff; text-decoration: none;
+
  font-variant: small-caps;
-
}
+
  float: left;
 +
  width: 40%;
 +
  max-width: 768px;
 +
  min-width: 440px;
 +
 
-
nav ul ul {
 
-
background: #5f6975; border-radius: 0px; padding: 0;
 
-
position: absolute; top: 100%;
 
}
}
-
nav ul ul li {
 
-
float: none;
 
-
border-top: 1px solid #6b727c;
 
-
border-bottom: 1px solid #575f6a;
 
-
position: relative;
 
-
}
 
-
nav ul ul li a {
 
-
padding: 15px 28.45px;
 
-
color: #fff;
 
-
}
 
-
nav ul ul li a:hover {
 
-
background: #4b545f;
 
-
}
 
-
nav ul ul ul {
+
#menu > ul {
-
position: absolute; left: 100%; top:0;
+
 
 +
  min-width: 440px;
}
}
-
/* Navbar code ends */
+
#menu ul {
 +
  margin:0;padding:0;
 +
  position:absolute;
 +
  width:40%;
 +
  max-width: 768px;
 +
 
 +
}
 +
#menu ul a {
 +
  text-decoration: none;
 +
}
 +
 
 +
#menu ul li {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
  min-width: 109px;
 +
  /*width: calc(225%/9); */
 +
 
 +
}
 +
 
 +
#menu > ul > li {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
/* width: calc(225%/9); */
 +
  border-top: 5px solid #000;
 +
  border-bottom: 5px solid #000;
 +
webkit-transition: all 0.3s ease-in-out;
 +
-moz-transition: all 0.3s ease-in-out;
 +
-o-transition: all 0.3s ease-in-out;
 +
transition: all 0.3s ease-in-out;
 +
}
 +
 
 +
#menu > ul > li:hover {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
/*  width: calc(225%/9);  */
 +
  border-top: 5px solid #d40400;
 +
  border-bottom: 5px solid #d40400;
 +
  background-color: #000;
 +
}
 +
 
 +
#menu ul li a:hover {
 +
color: #d40400;
 +
background-color: #000;
 +
}
 +
 
 +
#menu ul li a {
 +
  background: #000;
 +
  color: #fff;
 +
  display: block;
 +
  padding-top: 9px;
 +
  padding-bottom: 9px;
 +
  width:100%;
 +
 
 +
}
 +
 
 +
#menu ul ul {
 +
  padding:0;
 +
  overflow: hidden;
 +
  width: 100%;
 +
}
 +
 
 +
#menu ul ul li:first-child {
 +
  margin-top: 5px;
 +
  float: none;
 +
  display: none;
 +
  border-bottom: 1px solid #ccc;
 +
  border-left: 1px solid #ccc;
 +
  border-right: 1px solid #ccc;'
 +
  width: 100%; 
 +
}
 +
 
 +
 
 +
#menu ul ul li {
 +
  float: none;
 +
  display: none;
 +
  border-bottom: 1px solid #ccc;
 +
  border-left: 1px solid #ccc;
 +
  border-right: 1px solid #ccc; 
 +
  width: 100%;
 +
  z-index: 1000;
 +
}
 +
#menu ul ul li a {
 +
  background: #f0f0f0;
 +
  color: #333;
 +
  border:none;
 +
  width: 11.11%;
 +
  /* width: calc(100%/9); */
 +
}
 +
#menu ul ul li a:hover {
 +
  background: #ccc;
 +
}
 +
 
 +
#menu ul li a:hover,
 +
#menu ul li:hover ul li {
 +
  display:block !important;
 +
}
 +
 
 +
#menu ul li ul li{
 +
width:900%;
 +
}
 +
 
 +
#menu_right {
 +
  text-align: center;
 +
  background: #000;
 +
  height: 46px;
 +
  max-height:46px;
 +
  float: right;
 +
  width: 40%;
 +
  max-width: 768px;
 +
  min-width: 440px;
 +
  text-align: center;
 +
  font-family:  "Times New Roman", Times, serif;
 +
  font-size: 18px;
 +
  font-variant: small-caps;
 +
  //font-weight:bold;
 +
 
 +
}
 +
 
 +
#menu_right > ul {
 +
 
 +
  min-width: 440px;
 +
}
 +
 
 +
#menu_right ul {
 +
  margin:0;padding:0;
 +
  position:absolute;
 +
  width:40%;
 +
  max-width: 768px;
 +
 
 +
}
 +
#menu_right ul a {
 +
  text-decoration: none;
 +
 
 +
}
 +
 
 +
#menu_right ul li {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
  min-width: 110px;
 +
  /* width: calc(225%/9); */
 +
}
 +
 
 +
#menu_right > ul > li {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
  /* width: calc(225%/9); */
 +
  border-top: 5px solid #000;
 +
  border-bottom: 5px solid #000;
 +
webkit-transition: all 0.3s ease-in-out;
 +
-moz-transition: all 0.3s ease-in-out;
 +
-o-transition: all 0.3s ease-in-out;
 +
transition: all 0.3s ease-in-out;
 +
}
 +
 
 +
#menu_right > ul > li:hover {
 +
  list-style: none;
 +
  float: left;
 +
  position: relative;
 +
  width: 25%;
 +
  /* width: calc(225%/9); */
 +
  border-top: 5px solid #d40400;
 +
  border-bottom: 5px solid #d40400;
 +
  background-color: #000;
 +
}
 +
 
 +
#menu_right ul li a:hover {
 +
 
 +
color: #d40400;
 +
background-color: #000;
 +
}
 +
 
 +
#menu_right ul li a {
 +
  background: #000;
 +
  color: #fff;
 +
  display: block;
 +
  padding-top: 9px;
 +
  padding-bottom: 9px;
 +
  width:100%;
 +
 
 +
}
 +
 
 +
#menu_right ul ul {
 +
  padding:0;
 +
  overflow: hidden;
 +
  width: 100%;
 +
}
 +
 
 +
#menu_right ul ul li:first-child {
 +
  margin-top: 5px;
 +
  float: none;
 +
  display: none;
 +
  border-bottom: 1px solid #ccc;
 +
  border-left: 1px solid #ccc;
 +
  border-right: 1px solid #ccc;'
 +
  width: 100%;
 +
}
 +
 
 +
#menu_right ul ul li {
 +
  float: none;
 +
  display: none;
 +
  border-bottom: 1px solid #ccc;
 +
  border-left: 1px solid #ccc;
 +
  border-right: 1px solid #ccc; 
 +
  width: 100%;
 +
  z-index: 1000;
 +
}
 +
 
 +
#menu_right ul ul li a {
 +
  background: #f0f0f0;
 +
  color: #333;
 +
  border:none;
 +
  width: 11.11%;
 +
  /* width: calc(100%/9); */
 +
}
 +
#menu_right ul ul li a:hover {
 +
  background: #ccc;
 +
}
 +
 
 +
#menu_right ul li a:hover,
 +
#menu_right ul li:hover ul li {
 +
  display:block !important;
 +
}
 +
 
 +
#menu_right ul li ul li{
 +
width:900%;
 +
}

Latest revision as of 18:16, 16 October 2014

@font-face {

   font-family: DeliciousRoman, Helvetica, Arial, sans-serif;
   src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
   font-weight:400;

}

/* ------- Font size dynamic with resolution ------- */


/* ------- Nav-bar ----------- */

  1. menu_container {

clear: both; width:100%; max-width: 1920px; min-width: 1100px; margin-right: auto; margin-left: auto;

}

.clear { clear: both; /* Vettefan varför man behöver en tom div som bara clearar, allting fuckade upp utan denna */ }

  1. middle_logo {
       position: relative;

width: 20%; height: 0px; border-top: 55px solid black; float: left; }

.home_logo { position: absolute; top: -130px; left: 50%; margin-left: -125px; width: 250px; height: 187px;

}

  1. menu {
 background: #000;
 height: 46px;
 max-height:46px;
 text-align: center;
 font-family:  "Times New Roman", Times, serif;
 font-size: 18px;
 font-variant: small-caps;
 float: left;
 width: 40%;
 max-width: 768px;
 min-width: 440px;


}

  1. menu > ul {
 min-width: 440px;

}

  1. menu ul {
 margin:0;padding:0;
 position:absolute;
 width:40%;
 max-width: 768px;

}

  1. menu ul a {
 text-decoration: none;

}

  1. menu ul li {
 list-style: none;
 float: left;
 position: relative;
 width: 25%;
 min-width: 109px;
 /*width: calc(225%/9); */

}

  1. menu > ul > li {
 list-style: none;
 float: left;
 position: relative;
 width: 25%;
/* width: calc(225%/9); */
 border-top: 5px solid #000;
 border-bottom: 5px solid #000;

webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; }

  1. menu > ul > li:hover {
 list-style: none;
 float: left;
 position: relative;
 width: 25%;
/*  width: calc(225%/9);  */
 border-top: 5px solid #d40400;
 border-bottom: 5px solid #d40400;
 background-color: #000;

}

  1. menu ul li a:hover {

color: #d40400; background-color: #000; }

  1. menu ul li a {
 background: #000;
 color: #fff;
 display: block;
 padding-top: 9px;
 padding-bottom: 9px;
 width:100%;

}

  1. menu ul ul {
 padding:0;
 overflow: hidden;
 width: 100%;

}

  1. menu ul ul li:first-child {
 margin-top: 5px;
 float: none;
 display: none;
 border-bottom: 1px solid #ccc;
 border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;'
 width: 100%;  

}


  1. menu ul ul li {
 float: none;
 display: none;
 border-bottom: 1px solid #ccc;
 border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;  
 width: 100%;
 z-index: 1000;

}

  1. menu ul ul li a {
 background: #f0f0f0;
 color: #333;
 border:none;
 width: 11.11%;
 /* width: calc(100%/9); */

}

  1. menu ul ul li a:hover {
 background: #ccc;

}

  1. menu ul li a:hover,
  2. menu ul li:hover ul li {
 display:block !important;

}

  1. menu ul li ul li{

width:900%; }

  1. menu_right {
 text-align: center;
 background: #000;
 height: 46px;
 max-height:46px;
 float: right;
 width: 40%;
 max-width: 768px; 
 min-width: 440px;
 text-align: center;
 font-family:  "Times New Roman", Times, serif;
 font-size: 18px;
 font-variant: small-caps;
 //font-weight:bold;

}

  1. menu_right > ul {
 min-width: 440px;

}

  1. menu_right ul {
 margin:0;padding:0;
 position:absolute;
 width:40%;
 max-width: 768px; 

}

  1. menu_right ul a {
 text-decoration: none;

}

  1. menu_right ul li {
 list-style: none;
 float: left;
 position: relative;
 width: 25%;
 min-width: 110px;
 /* width: calc(225%/9); */

}

  1. menu_right > ul > li {
 list-style: none;
 float: left;
 position: relative;
 width: 25%;
 /* width: calc(225%/9); */
 border-top: 5px solid #000;
 border-bottom: 5px solid #000;

webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; }

  1. menu_right > ul > li:hover {
 list-style: none;
 float: left;
 position: relative; 
 width: 25%;
 /* width: calc(225%/9); */
 border-top: 5px solid #d40400;
 border-bottom: 5px solid #d40400;
 background-color: #000;

}

  1. menu_right ul li a:hover {

color: #d40400; background-color: #000; }

  1. menu_right ul li a {
 background: #000;
 color: #fff;
 display: block;
 padding-top: 9px;
 padding-bottom: 9px;
 width:100%;

}

  1. menu_right ul ul {
 padding:0;
 overflow: hidden;
 width: 100%;

}

  1. menu_right ul ul li:first-child {
 margin-top: 5px;
 float: none;
 display: none;
 border-bottom: 1px solid #ccc;
 border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;'
 width: 100%; 

}

  1. menu_right ul ul li {
 float: none;
 display: none;
 border-bottom: 1px solid #ccc;
 border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;  
 width: 100%;
 z-index: 1000;

}

  1. menu_right ul ul li a {
 background: #f0f0f0;
 color: #333;
 border:none;
 width: 11.11%;
 /* width: calc(100%/9); */

}

  1. menu_right ul ul li a:hover {
 background: #ccc;

}

  1. menu_right ul li a:hover,
  2. menu_right ul li:hover ul li {
 display:block !important;

}

  1. menu_right ul li ul li{

width:900%; }