回答編集履歴

2

a

2019/03/03 17:07

投稿

退会済みユーザー
test CHANGED
@@ -1,4 +1,4 @@
1
- https://codepen.io/anon/pen/xBGXMP
1
+ https://codepen.io/anon/pen/KEMVzz
2
2
 
3
3
  こんな感じでできるよってところまで。
4
4
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  </main>
34
34
 
35
- <footer> フッター <footer>
35
+ <footer> フッター </footer>
36
36
 
37
37
  </div>
38
38
 
@@ -54,7 +54,7 @@
54
54
 
55
55
  width: 1000px;
56
56
 
57
- margin: 0, auto;
57
+ margin: 0 auto;
58
58
 
59
59
  padding-top: 100px;
60
60
 
@@ -77,6 +77,8 @@
77
77
  width: 100%;
78
78
 
79
79
  height: 100px;
80
+
81
+ left: 0;
80
82
 
81
83
  }
82
84
 

1

rf

2019/03/03 17:07

投稿

退会済みユーザー
test CHANGED
@@ -9,3 +9,119 @@
9
9
  ヘッダフッタの高さもてきとー
10
10
 
11
11
  おすきに変えて使ってください
12
+
13
+
14
+
15
+ ---
16
+
17
+
18
+
19
+ いちおーコードはりますね
20
+
21
+ HTMLは```<div id=container>
22
+
23
+
24
+
25
+ <header> ヘッダー </header>
26
+
27
+ <nav>なび
28
+
29
+ </nav>
30
+
31
+ <main>めいん
32
+
33
+ </main>
34
+
35
+ <footer> フッター <footer>
36
+
37
+ </div>
38
+
39
+ ```
40
+
41
+
42
+
43
+ ```ここに言語を入力
44
+
45
+ * {
46
+
47
+ margin: 0;
48
+
49
+ padding: 0;
50
+
51
+ }
52
+
53
+ #container {
54
+
55
+ width: 1000px;
56
+
57
+ margin: 0, auto;
58
+
59
+ padding-top: 100px;
60
+
61
+ }
62
+
63
+ #container > * + * {
64
+
65
+ margin-bottom: 1em;
66
+
67
+ }
68
+
69
+
70
+
71
+ header,
72
+
73
+ footer {
74
+
75
+ position: fixed;
76
+
77
+ width: 100%;
78
+
79
+ height: 100px;
80
+
81
+ }
82
+
83
+ header {
84
+
85
+ top: 0;
86
+
87
+ background-color: red;
88
+
89
+ }
90
+
91
+
92
+
93
+ footer {
94
+
95
+ bottom: 0;
96
+
97
+ background-color: green;
98
+
99
+ }
100
+
101
+
102
+
103
+ nav {
104
+
105
+ width: 100%;
106
+
107
+ height: 50px;
108
+
109
+ background-color: blue;
110
+
111
+ }
112
+
113
+ main {
114
+
115
+ width: 100%;
116
+
117
+ height: 150px;
118
+
119
+ background-color: yellow;
120
+
121
+ }
122
+
123
+
124
+
125
+
126
+
127
+ ```CSSはこんな感じ