Skip to content

Commit 1abb817

Browse files
committed
Moved CSS to file
1 parent dfd0d59 commit 1abb817

2 files changed

Lines changed: 32 additions & 34 deletions

File tree

css/game.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* Styling needed for a fullscreen canvas and no scrollbars. */
2+
body, html {
3+
width: 100%;
4+
height: 100%;
5+
margin: 0;
6+
padding: 0;
7+
overflow: hidden;
8+
}
9+
10+
#starfield {
11+
width:100%;
12+
height:100%;
13+
z-index: -1;
14+
position: absolute;
15+
left: 0px;
16+
top: 0px;
17+
}
18+
#gamecontainer {
19+
width: 800px;
20+
margin-left: auto;
21+
margin-right: auto;
22+
}
23+
#gamecanvas {
24+
width: 800px;
25+
height: 600px;
26+
}
27+
#info {
28+
width: 800px;
29+
margin-left: auto;
30+
margin-right: auto;
31+
}

index.html

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,7 @@
44
<title>Space Invaders</title>
55
<link rel="stylesheet" type="text/css" href="css/core.css">
66
<link rel="stylesheet" type="text/css" href="css/typeography.css">
7-
<style>
8-
9-
/* Styling needed for a fullscreen canvas and no scrollbars. */
10-
body, html {
11-
width: 100%;
12-
height: 100%;
13-
margin: 0;
14-
padding: 0;
15-
overflow: hidden;
16-
}
17-
18-
#starfield {
19-
width:100%;
20-
height:100%;
21-
z-index: -1;
22-
position: absolute;
23-
left: 0px;
24-
top: 0px;
25-
}
26-
#gamecontainer {
27-
width: 800px;
28-
margin-left: auto;
29-
margin-right: auto;
30-
}
31-
#gamecanvas {
32-
width: 800px;
33-
height: 600px;
34-
}
35-
#info {
36-
width: 800px;
37-
margin-left: auto;
38-
margin-right: auto;
39-
}
40-
</style>
7+
<link rel="stylesheet" type="text/css" href="css/game.css">
418
</head>
429
<body>
4310
<div id="starfield"></div>

0 commit comments

Comments
 (0)