質問編集履歴

1

最新版に変更しました。

2018/11/05 01:52

投稿

kazupo
kazupo

スコア12

test CHANGED
@@ -1 +1 @@
1
- フッターが、メインのコンテンツに被ってしまます。。
1
+ お問い合わせ(contents-title)が、左寄せできな
test CHANGED
@@ -1,12 +1,10 @@
1
- ![写真のようにフッターが被ってる。。](54d9cfb2e5777c34dd2625ce83d15196.png)
1
+ ![お問合わせを左寄せしたい](324870420791b9bf0778290340544567.png)
2
2
 
3
3
 
4
4
 
5
5
  コードは、以下になります。。
6
6
 
7
- ```<!DOCTYPE html>
8
-
9
- <html>
7
+ ```<html>
10
8
 
11
9
  <head>
12
10
 
@@ -84,58 +82,58 @@
84
82
 
85
83
  <div class="contents">
86
84
 
85
+ <h3 class="section-title">
86
+
87
+ 学べるレッスン
88
+
89
+ </h3>
90
+
91
+ <div class="contents-item">
92
+
93
+ <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/html.svg
94
+
95
+ ">
96
+
97
+ <p>HTML & CSS</p>
98
+
99
+ </div>
100
+
101
+ <div class="contents-item">
102
+
103
+ <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/php.svg">
104
+
105
+ <p>PHP</p>
106
+
107
+ </div>
108
+
109
+ <div class="contents-item">
110
+
111
+ <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/ruby.svg
112
+
113
+ ">
114
+
115
+ <p>Ruby</p>
116
+
117
+ </div>
118
+
119
+ <div class="contents-item">
120
+
121
+ <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/swift.svg
122
+
123
+ ">
124
+
125
+ <p>Swift</p>
126
+
127
+ </div>
128
+
129
+ <div class="contactform">
130
+
87
131
  <h3 class="contents-title">
88
132
 
89
- 学べるレッスン
133
+ お問い合わせ
90
134
 
91
135
  </h3>
92
136
 
93
- <div class="contents-item">
94
-
95
- <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/html.svg
96
-
97
- ">
98
-
99
- <p>HTML & CSS</p>
100
-
101
- </div>
102
-
103
- <div class="contents-item">
104
-
105
- <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/php.svg">
106
-
107
- <p>PHP</p>
108
-
109
- </div>
110
-
111
- <div class="contents-item">
112
-
113
- <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/ruby.svg
114
-
115
- ">
116
-
117
- <p>Ruby</p>
118
-
119
- </div>
120
-
121
- <div class="contents-item">
122
-
123
- <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/swift.svg
124
-
125
- ">
126
-
127
- <p>Swift</p>
128
-
129
- </div>
130
-
131
- <div class="contactform">
132
-
133
- <h3 class="contents-title">
134
-
135
- お問い合わせ
136
-
137
- </h3>
138
-
139
137
  <p>メールアドレス(必須)</p>
140
138
 
141
139
  <input>
@@ -162,8 +160,6 @@
162
160
 
163
161
  </div>
164
162
 
165
- </div>
166
-
167
163
  <div class="footer-list">
168
164
 
169
165
  <ul>
@@ -190,12 +186,12 @@
190
186
 
191
187
  </div>
192
188
 
189
+ </div>
190
+
193
191
  </body>
194
192
 
195
193
  </html>
196
194
 
197
- コード
198
-
199
195
  ```
200
196
 
201
197
  ```/* CSSのリセット(消さないでください) */
@@ -226,233 +222,225 @@
226
222
 
227
223
  /* ここからCSSを記述してください */
228
224
 
229
- .body{
230
-
231
- font-family:"Avenir Next", "Hiragino Kaku Gothic ProN W3", sans-serif;
232
-
233
- }
234
-
235
-
236
-
237
- .header{
238
-
239
- height:90px;
240
-
241
- background-color:#26d0c9;
242
-
243
- color:#fff;
244
-
245
- }
246
-
247
-
248
-
249
- .header-logo{
250
-
251
- font-size:36px;
252
-
253
- float:left;
254
-
255
- margin:20px 40px;
256
-
257
- }
258
-
259
-
260
-
261
- .header-list li{
262
-
263
- float:left;
264
-
265
- margin:33px 20px;
266
-
267
- }
268
-
269
-
270
-
271
- .main{
272
-
273
- margin:100px 80px;
274
-
275
- }
276
-
277
-
278
-
279
- .copy-container h1{
280
-
281
- font-size:115px;
282
-
283
- }
284
-
285
-
286
-
287
- .copy-container span{
288
-
289
- color:#ff4a4a;
290
-
291
- }
292
-
293
-
294
-
295
- .copy-container h2{
296
-
297
- font-size:60px;
298
-
299
- padding-top:40px;
300
-
301
- }
302
-
303
-
304
-
305
- .contents{
306
-
307
- margin-top:100px;
308
-
309
- height:500px;
310
-
311
- }
312
-
313
-
314
-
315
- h3{
316
-
317
- font-size:28px;
318
-
319
- padding-bottom:15px;
320
-
321
- margin-bottom:35px;
322
-
323
- border-bottom:2px solid #dee7ec;
324
-
325
- }
326
-
327
-
328
-
329
- .contents-item{
330
-
331
- float:left;
332
-
333
- padding-right:40px;
334
-
335
- margin-bottom:120px;
336
-
337
- margin-top:50px;
338
-
339
- }
340
-
341
-
342
-
343
- p{
344
-
345
- font-size:24px;
346
-
347
- padding-top:30px;
348
-
349
- }
350
-
351
-
352
-
353
- .contactform{
354
-
355
- width:400px;
356
-
357
- }
358
-
359
- .contactform p{
360
-
361
- padding-bottom:10px;
362
-
363
- font-size:18px;
364
-
365
- }
366
-
367
-
368
-
369
- input {
370
-
371
- border:1px solid #dee7ec;
372
-
373
- width:400px;
374
-
375
- padding:20px;
376
-
377
- margin-bottom:30px;
378
-
379
- font-size:18px;
380
-
381
- }
382
-
383
-
384
-
385
- textarea{
386
-
387
- border:1px solid #dee7ec;
388
-
389
- width:400px;
390
-
391
- padding:20px;
392
-
393
- font-size:18px;
394
-
395
- }
396
-
397
-
398
-
399
- .submit-button{
400
-
401
- font-size:18px;
402
-
403
- background-color:#889eab;
404
-
405
- margin-bottom:30px;
406
-
407
- }
408
-
409
-
410
-
411
- .footer{
412
-
413
- background-color:#2f5167;
414
-
415
- color:#fff;
416
-
417
- padding:40px;
418
-
419
- height:200px;
420
-
421
-
422
-
423
- }
424
-
425
-
426
-
427
- .footer-logo{
428
-
429
- font-size:32px;
430
-
431
- float:left;
432
-
433
- }
434
-
435
-
436
-
437
- .footer-list{
438
-
439
- float:right;
440
-
441
- color:#fff;
442
-
443
- padding-bottom:20px;
444
-
445
- }
446
-
447
-
448
-
449
- ul{
450
-
451
- padding-bottom:20px;
452
-
453
- }
454
-
455
- コード
225
+ body {
226
+
227
+ font-family: "Avenir Next", "Hiragino Kaku Gothic ProN W3", sans-serif;
228
+
229
+ }
230
+
231
+
232
+
233
+ .header {
234
+
235
+ background-color: #26d0c9;
236
+
237
+ color: #fff;
238
+
239
+ height: 90px;
240
+
241
+ }
242
+
243
+
244
+
245
+ .header-logo {
246
+
247
+ float: left;
248
+
249
+ font-size: 36px;
250
+
251
+ padding: 20px 40px;
252
+
253
+ }
254
+
255
+
256
+
257
+ .header-list {
258
+
259
+ float: left;
260
+
261
+ }
262
+
263
+
264
+
265
+ .header-list li {
266
+
267
+ float: left;
268
+
269
+ padding: 33px 20px;
270
+
271
+ }
272
+
273
+
274
+
275
+ .main {
276
+
277
+ padding: 100px 80px;
278
+
279
+ overflow:hidden;
280
+
281
+ }
282
+
283
+
284
+
285
+
286
+
287
+ .copy-container h1 {
288
+
289
+ font-size: 140px;
290
+
291
+ }
292
+
293
+
294
+
295
+ .copy-container h2 {
296
+
297
+ font-size: 60px;
298
+
299
+ }
300
+
301
+
302
+
303
+ .copy-container span {
304
+
305
+ color: #ff4a4a;
306
+
307
+ }
308
+
309
+
310
+
311
+ .contents {
312
+
313
+ margin-top: 100px;
314
+
315
+ overflow:hidden;
316
+
317
+ }
318
+
319
+
320
+
321
+ .section-title {
322
+
323
+ border-bottom: 2px solid #dee7ec;
324
+
325
+ font-size: 28px;
326
+
327
+ padding-bottom: 15px;
328
+
329
+ margin-bottom: 50px;
330
+
331
+ }
332
+
333
+
334
+
335
+ .contents-item {
336
+
337
+ float: left;
338
+
339
+ margin-right: 40px;
340
+
341
+ }
342
+
343
+
344
+
345
+ .contents-item p {
346
+
347
+ font-size: 24px;
348
+
349
+ margin-top: 30px;
350
+
351
+ }
352
+
353
+
354
+
355
+ .contact-form {
356
+
357
+ padding-top: 100px;
358
+
359
+ }
360
+
361
+
362
+
363
+ input, textarea {
364
+
365
+ width: 400px;
366
+
367
+ margin-top: 10px;
368
+
369
+ margin-bottom: 30px;
370
+
371
+ padding: 20px;
372
+
373
+ font-size: 18px;
374
+
375
+ border: 1px solid #dee7ec;
376
+
377
+ }
378
+
379
+
380
+
381
+ .contact-submit {
382
+
383
+ background-color: #dee7ec;
384
+
385
+ color: #889eab;
386
+
387
+ }
388
+
389
+
390
+
391
+ .footer {
392
+
393
+ background-color: #2f5167;
394
+
395
+ color: #fff;
396
+
397
+ height: 120px;
398
+
399
+ padding: 40px;
400
+
401
+
402
+
403
+ }
404
+
405
+
406
+
407
+ .footer-logo {
408
+
409
+ float: left;
410
+
411
+ font-size: 32px;
412
+
413
+ }
414
+
415
+
416
+
417
+ .footer-list {
418
+
419
+ float: right;
420
+
421
+ }
422
+
423
+
424
+
425
+ .footer-list li {
426
+
427
+ padding-bottom: 20px;
428
+
429
+ }
430
+
431
+
432
+
433
+ .contents-title {
434
+
435
+ border-bottom: 2px solid #dee7ec;
436
+
437
+ font-size: 28px;
438
+
439
+ padding-bottom: 15px;
440
+
441
+ margin-bottom: 50px;
442
+
443
+ }
456
444
 
457
445
  ```
458
446
 
@@ -462,9 +450,11 @@
462
450
 
463
451
 
464
452
 
465
- footerのmargin-topを入れ。→未解決
453
+ 初めは、「学べるレッスン」と同じ.section-titleで作っいましが、
454
+
466
-
455
+ 「お問い合わせ」だけ、左に寄らないので、.contents-titleとして、cssを別に書いていじってみました。。ができずでした。。
456
+
467
- mainのheigtを大した。→未解決
457
+ 他にも、align="right"など試しましたが、解決でませんでした。
468
458
 
469
459
 
470
460