Template:Team:DTU-Denmark/css3

From 2014.igem.org

(Difference between revisions)
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 203: Line 203:
top:100px;
top:100px;
left:60px;
left:60px;
-
position:relative;
+
position:fixed;
z-index:30;
z-index:30;
}
}
Line 212: Line 212:
margin: 0 20px 0 0;
margin: 0 20px 0 0;
float: left;
float: left;
-
position: fixed;
+
position: relative;
list-style: none;
list-style: none;
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 src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
 
-
<script>
 
-
var num = 150; //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>

Revision as of 11:58, 24 July 2014