回答編集履歴
1
質問者さんの条件追加による追記
test
CHANGED
@@ -165,3 +165,163 @@
|
|
165
165
|
</html>
|
166
166
|
|
167
167
|
```
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
footer fixed版(+アルファでright-content 右寄せ版)
|
172
|
+
|
173
|
+
```
|
174
|
+
|
175
|
+
<!DOCTYPE html>
|
176
|
+
|
177
|
+
<html lang="ja" class="">
|
178
|
+
|
179
|
+
<head>
|
180
|
+
|
181
|
+
<meta charset="UTF-8">
|
182
|
+
|
183
|
+
<title>Document</title>
|
184
|
+
|
185
|
+
<link rel="stylesheet" href="sample.css">
|
186
|
+
|
187
|
+
</head>
|
188
|
+
|
189
|
+
<body>
|
190
|
+
|
191
|
+
<header>header
|
192
|
+
|
193
|
+
</header>
|
194
|
+
|
195
|
+
<div class="contents">
|
196
|
+
|
197
|
+
<div class="left-content">left</div>
|
198
|
+
|
199
|
+
<div class="right-content">right</div>
|
200
|
+
|
201
|
+
<div class="bottom-content">bottom</div>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<footer>footer
|
208
|
+
|
209
|
+
</footer>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<style>
|
216
|
+
|
217
|
+
html, body{
|
218
|
+
|
219
|
+
display: ;
|
220
|
+
|
221
|
+
height: 100%;
|
222
|
+
|
223
|
+
width:100%;
|
224
|
+
|
225
|
+
margin: 0;
|
226
|
+
|
227
|
+
padding: 0;
|
228
|
+
|
229
|
+
}
|
230
|
+
|
231
|
+
header{
|
232
|
+
|
233
|
+
position:fixed ;
|
234
|
+
|
235
|
+
background-color: gray;
|
236
|
+
|
237
|
+
height: 70px;
|
238
|
+
|
239
|
+
width: 100%;
|
240
|
+
|
241
|
+
min-width: 960px;
|
242
|
+
|
243
|
+
}
|
244
|
+
|
245
|
+
.contents{
|
246
|
+
|
247
|
+
width: 960px;
|
248
|
+
|
249
|
+
background-color: #eee;
|
250
|
+
|
251
|
+
margin:0 auto;
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
.left-content{
|
258
|
+
|
259
|
+
padding:70px 0 0 0;
|
260
|
+
|
261
|
+
background-color: red;
|
262
|
+
|
263
|
+
width: 700px;
|
264
|
+
|
265
|
+
height: 400px;
|
266
|
+
|
267
|
+
float: left;
|
268
|
+
|
269
|
+
}
|
270
|
+
|
271
|
+
.right-content{
|
272
|
+
|
273
|
+
padding:70px 0 0 0;
|
274
|
+
|
275
|
+
background-color: yellow;
|
276
|
+
|
277
|
+
width: 200px;
|
278
|
+
|
279
|
+
height: 300px;
|
280
|
+
|
281
|
+
float: right;
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
.bottom-content{
|
286
|
+
|
287
|
+
background-color: green;
|
288
|
+
|
289
|
+
height: 250px;
|
290
|
+
|
291
|
+
width:100%;
|
292
|
+
|
293
|
+
margin-top:;
|
294
|
+
|
295
|
+
float:left
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
footer{
|
302
|
+
|
303
|
+
clear:both;
|
304
|
+
|
305
|
+
position: fixed;
|
306
|
+
|
307
|
+
height: 60px;
|
308
|
+
|
309
|
+
width:100%;
|
310
|
+
|
311
|
+
background-color: aqua;
|
312
|
+
|
313
|
+
margin-top:600px;
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
</style>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
</body>
|
324
|
+
|
325
|
+
</html>
|
326
|
+
|
327
|
+
```
|