Template:Team:Calgary/Test

From 2013.igem.org

(Difference between revisions)
Line 33: Line 33:
<link href="https://2013.igem.org/Team:Calgary/TestPageCSS?action=raw&ctype=text/css" rel="stylesheet">
<link href="https://2013.igem.org/Team:Calgary/TestPageCSS?action=raw&ctype=text/css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 +
<script>
<script>
-
function NavSizing() {
+
$(document).ready(function() {
if ($('body').width() > 868) {
if ($('body').width() > 868) {
$('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2));
$('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2));
Line 43: Line 44:
$('#LogoItem').css('display', 'none');
$('#LogoItem').css('display', 'none');
}
}
-
}
 
-
</script>
 
-
<script>
 
-
$(document).ready(function() {
 
-
NavSizing();
 
$(window).resize(function() {
$(window).resize(function() {
-
NavSizing();
+
if ($('body').width() > 868) {
 +
$('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2));
 +
$('#LogoItem').css('display', 'block');
 +
}
 +
else if (($('body').width() <= 868) && ($('body').width() > 744)) {
 +
$('#TopBar').css('padding-left', Math.floor(($('body').width() - 744) / 2));
 +
$('#LogoItem').css('display', 'none');
 +
}
});
});
-
});
+
});</script>
-
</script>
+
</head>
</head>
</html
</html

Revision as of 22:30, 13 August 2013

Home