Template:Team:DTU-Denmark/css3

From 2014.igem.org

(Difference between revisions)
 
(11 intermediate revisions not shown)
Line 170: Line 170:
.header{
.header{
background-color:#2c8d26; /* #2c8d26 Green #353535 old black*/
background-color:#2c8d26; /* #2c8d26 Green #353535 old black*/
-
position:absolute;
+
position:fixed;
height:135px;
height:135px;
top:0px;
top:0px;
Line 210: Line 210:
color: #FFF;
color: #FFF;
background-color:none;
background-color:none;
-
margin: 0 20px 0 0;
+
margin: 0 10px 0 0;
float: left;
float: left;
position: relative;
position: relative;
Line 224: Line 224:
font-weight:700;
font-weight:700;
line-height:210%;
line-height:210%;
-
color: #FF0000;
+
color: none;
text-decoration: none;
text-decoration: none;
                 position: relative;
                 position: relative;
Line 241: Line 241:
/*border-top:solid 1px #ffff00;*/
/*border-top:solid 1px #ffff00;*/
/*border-bottom:solid 1px #ffff00;*/
/*border-bottom:solid 1px #ffff00;*/
-
padding: 5px 5px 5px 5px;
+
padding: 7px 5px 3px 5px;
Line 477: Line 477:
}
}
}
}
-
.menu {
+
 
-
    background:#345;
+
-
    color:#FFF;
+
-
    height:2em;
+
-
    padding:.5em;
+
-
    position:absolute;
+
-
    top:50px;
+
-
    width:100%;
+
-
}
+
-
.fixed {
+
-
    position:fixed;
+
-
    top:0;
+
-
}
+
</style>
</style>
-
<script>
 
-
var num = 50; //number of pixels before modifying styles
 
-
 
-
$(window).bind('scroll', function () {
 
-
    if ($(window).scrollTop() > num) {
 
-
        $('.menu').addClass('fixed');
 
-
    } else {
 
-
        $('.menu').removeClass('fixed');
 
-
    }
 
-
});
 
-
 
-
//USE SCROLL WHEEL FOR THIS FIDDLE DEMO
 
-
</script>
 
</html>
</html>

Latest revision as of 09:53, 29 July 2014