teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

簡潔にまとめた

2020/10/15 14:42

投稿

ShinKoba
ShinKoba

スコア8

title CHANGED
File without changes
body CHANGED
@@ -2,194 +2,23 @@
2
2
 
3
3
  この矢印で刺しているタイトルの文字にmarginが効かない場合どうしたらいいでしょうか。
4
4
  この場合、いつもpositionで移動しているのですが、なるべくは使わない方法でやりたいと思っています。
5
- ご教授いただければ幸いです。```ここに言語を入力
5
+ ご教授いただければ幸いです。
6
- コード
7
- ```header{
8
- background-color: #1dcae0;
9
- display: flex;
10
- justify-content: space-between;
11
- color: #fff;
12
- font-size: 18px;
13
- padding: 5px 0;
14
- }
15
6
 
16
- .fixed{
17
- position: fixed;
18
- width: 100%;
19
- /*margin-top: -70px;*/
20
- }
21
7
 
8
+ ```HTML
22
- #margin-for-fixed{
9
+ <footer>
23
- /*margin-top: 70px;*/
10
+ <!-- footer 左がわ -->
11
+ <div class="icon">
12
+ <img src="img/seedkun.png">
13
+ <span class="name"><strong>Seed</strong>Kun</span>
24
- }
14
+ </div>
15
+ <!-- footer 右側 -->
16
+ <a class="footer-right">Copyright(c)Seedkun inc</a>
17
+ </footer>
25
18
 
19
+ ``
26
- .icon{
20
+ ```CSS
27
- align-items: center;
28
- }
29
21
 
30
- .icon img{
31
- height: 60px;
32
- align-items: center;
33
- margin-left: 80px;
34
- }
35
-
36
- .icon .name strong{
37
- color: #eae51f;
38
- }
39
-
40
- .header-right{
41
- display: flex;
42
- align-items: center;
43
- margin-right: 80px
44
- }
45
-
46
- .header-right li:first-child{
47
- margin-right: 20px;
48
- }
49
- /*header終わり*/
50
- .welcome{
51
- height:500px;
52
- background-image: url(../img/background1.jpg);
53
- color: #fff;
54
- text-align: center;
55
- display: flex;
56
- flex-direction: column;
57
- justify-content: center;
58
- }
59
-
60
- .title{
61
- font-size: 64px;
62
- }
63
-
64
- .guideline{
65
- font-size: 28px;
66
- font-weight:bold;
67
- margin-top: 16px;
68
- }
69
-
70
- .btn-group{
71
- margin-top: 60px;
72
- }
73
-
74
-
75
- .btn{
76
- height: 55px;
77
- width: 170px;
78
- color: #fff;
79
- border-radius: 10px;
80
- cursor: pointer;
81
- margin-left: 120px;
82
- font-size: 28px;
83
- }
84
-
85
- .btn:first-child{
86
- margin-left: 0;
87
- }
88
-
89
- .register{
90
- background-color: rgba(29,172,224, .5);
91
- border: 3px solid rgba(29,172,224, .5);
92
- }
93
-
94
- .register:hover{
95
- background-color: rgb(29,172,224);
96
- }
97
-
98
- .login{
99
- background-color: rgba(236,227,35, .5);
100
- border:3px solid rgba(236,227,35, .3);
101
- }
102
-
103
- .login:hover{
104
- background-color: rgb(236,227,35);
105
- }
106
-
107
- /*welcome 終わり*/
108
-
109
- /*curriculum*/
110
- .curriculum{
111
- margin-top: 50px;
112
- }
113
-
114
- .subtitle{
115
- font-size: 36px;
116
- text-align: center;
117
- }
118
-
119
- .img-box{
120
- display: flex;
121
- justify-content: center;
122
- margin-top: 50px;
123
- }
124
-
125
- .img-box li{
126
- display: flex;
127
- flex-direction: column;
128
- text-align: center;
129
- margin: 0px 30px 0px 30px;
130
- }
131
-
132
- .img-box li img {
133
- height: 300px;
134
- width:300px;
135
- }
136
- /*curriculum終わり*/
137
-
138
- /*contact us*/
139
- .contact{
140
- text-align: center;
141
- background-color: #ebf4f5;
142
- margin-top: 50px;
143
- height: 350px;
144
- display: flex;
145
- flex-direction: column;
146
- justify-content: center;
147
- }
148
-
149
- .form{
150
- display: flex;
151
- justify-content: center;
152
- }
153
-
154
- .form .name,.form .email{
155
- height: 50px;
156
- width: 400px;
157
- font-size:16px;
158
- box-sizing: border-box;
159
- }
160
-
161
- .form-left{
162
- margin-right:50px;
163
- }
164
-
165
- .inquiry{
166
- height: 120px;
167
- width:400px;
168
- font-size: 16px;
169
- box-sizing: border-box;
170
- }
171
-
172
- .form .name{
173
- margin-bottom: 20px;
174
- }
175
-
176
- .contact .form{
177
- margin: 50px 0 40px;
178
- }
179
- .contact button{
180
- background-color: #1dace0;
181
- color: #fff;
182
- border:3px solid #1dace0;
183
- border-radius: 10px;
184
- font-size: 24px;
185
- padding:15px 30px;
186
- box-sizing: border-box;
187
- }
188
- /*contact usここまで*/
189
-
190
-
191
- /*footer*/
192
-
193
22
  footer{
194
23
  background-color: #233f51;
195
24
  display: flex;
@@ -203,274 +32,4 @@
203
32
  footer .footer-right{
204
33
  margin-right: 80px;
205
34
  }
206
-
207
- /*footer終わり*/
208
-
209
- /*レスポンシブ対応*/
210
-
211
- /*小型PC用*/
212
- @media screen and (max-width: 1280px){
213
- .img-box li{
214
- margin-right: 30px;
215
- }
216
- }
217
-
218
-
219
- /*タブレット用*/
220
- @media screen and (max-width: 960px){
221
- .imb-box li{
222
- }
223
- .img-box{
224
- display: flex;
225
- flex-flow: wrap;
226
- }
227
- .curriculum span{
228
- font-size: 25px;
229
- margin:15px 0px;
230
- }
231
- .contact .form{
232
- flex-flow: column nowrap;
233
- margin:30px;
234
- }
235
-
236
- .form .name ,.form .email,.form .inquiry{
237
- width: 80%;
238
-
239
-
240
- }
241
- .form .name ,.form .email{
242
- height: 30px;
243
- }
244
-
245
- .form .inquiry{
246
- height: 50px;
247
- }
248
- .form-left{
249
- margin-right: 0;
250
- }
251
- .form-right{
252
- margin-top: 20px;
253
- }
254
- .contact button {
255
- font-size: 20px;
256
- padding: 5px 40px;
257
- }
258
-
259
-
260
- /*スマホ用*/
261
- @media screen and (max-width: 480px){
262
- body{
263
- min-width: 375px;
264
- }
265
- /*header*/
266
-
267
- .icon{
268
- margin-left: 20px;
269
- }
270
-
271
- .icon .name{
272
- display: none;
273
- }
274
-
275
- .header-right{
276
- display: none;
277
- }
278
-
279
- /*welcome*/
280
- .title{
281
- font-size: 30px;
282
- }
283
-
284
- .guideline{
285
- font-size: 24px;
286
- margin-top: 30px;
287
- font-weight: normal;
288
- }
289
-
290
- .btn-group{
291
- display: flex;
292
- flex-flow: column nowrap;
293
- align-items: center;
294
- margin-top: 40px;
295
- }
296
-
297
- .btn{
298
- height: 48px;
299
- width: 140px;
300
- margin-left: 0px;
301
- margin-top: 20px;
302
- font-size: 24px;
303
- font-weight: bold;
304
- border-radius: 10px;
305
- }
306
-
307
- .btn:first-child{
308
- margin-top: 0;
309
- }
310
-
311
- /*curriculum*/
312
- .subtitle{
313
- font-size: 24px;
314
- }
315
-
316
- .img-box{
317
- flex-flow: column nowrap;
318
- }
319
-
320
- .img-box li{
321
- display: flex;
322
- flex-direction: column;
323
- align-items: center;
324
- margin-top: 30px;
325
- }
326
-
327
- .img-box li span{
328
- font-size: 16px;
329
- margin-top: 20px;
330
- }
331
-
332
- .img-box li:first-child{
333
- margin-top:0px;
334
- }
335
-
336
- /*contact*/
337
- .contact .form{
338
- flex-flow: column nowrap;
339
- margin:30px;
340
- }
341
-
342
- .form .name ,.form .email,.form .inquiry{
343
- width: 80%;
344
-
345
-
346
- }
347
- .form .name ,.form .email{
348
- height: 30px;
349
- }
350
-
351
- .form .inquiry{
352
- height: 50px;
353
- }
354
- .form-left{
355
- margin-right: 0;
356
- }
357
- .form-right{
358
- margin-top: 20px;
359
- }
360
- .contact button {
361
- font-size: 20px;
362
- padding: 5px 40px;
363
- }
364
- /*footer*/
365
- footer{
366
- display: flex;
367
- justify-content: center;
368
- }
369
- footer .icon{
370
- display: none;
371
- }
372
-
373
- footer .footer-right{
374
- margin-right: 0;
375
- }
376
-
377
- ```ここに言語を入力
378
- コード
35
+ ```
379
- ```<!DOCTYPE html>
380
- <html lang="ja">
381
- <head>
382
- <title>Welcome</title>
383
- <meta charset="utf-8">
384
- <meta name="viewport" content="width=divice-width,initial-scale=1.0">
385
- <link rel="stylesheet" type="text/css" href="css/reset.css">
386
- <link rel="stylesheet" type="text/css" href="css/style.css">
387
-
388
- </head>
389
- <body>
390
- <!-- header -->
391
- <header class="fixed">
392
- <!-- header left -->
393
- <div class="icon">
394
- <img src="img/seedkun.png">
395
- <span class="name"><strong>Seed</strong>Kun</span>
396
- </div>
397
- <!-- header right -->
398
- <ul class="header-right">
399
- <li>新規登録</li>
400
- <li>ログイン</li>
401
- </ul>
402
- </header>
403
- <!-- header ここまで -->
404
-
405
- <!-- welcome -->
406
- <main class="welcome" id="margin-for-fixed">
407
- <h1 class="title">Welcome</h1>
408
- <ul class="guideline">
409
- <li>Be Athletes</li>
410
- <li>Go World</li>
411
- <li>Enjoy Everything</li>
412
- </ul>
413
- <div class="btn-group">
414
- <button class="btn register">新規登録</button>
415
- <button class="btn login">ログイン</button>
416
- </div>
417
- </main>
418
- <!-- welcomeここまで -->
419
-
420
- <!-- curriculum -->
421
- <main class="curriculum">
422
- <h2 class="subtitle">Nexseed Life</h2>
423
- <ul class="img-box">
424
- <li>
425
- <img src="img/programming.jpg">
426
- <span>programming</span>
427
- </li>
428
- <li>
429
- <img src="img/english.jpg">
430
- <span>English</span>
431
- </li>
432
- <li>
433
- <img src="img/enjoy.jpg"><span>Enjoy</span>
434
- </li>
435
- </ul>
436
- </main>
437
- <!-- curriculmここまで -->
438
-
439
- <!-- contact us -->
440
- <aside class="contact">
441
- <h2 class="subtitle">Contact Us</h2>
442
- <!-- form -->
443
- <form>
444
- <div class="form">
445
- <div class="form-left">
446
- <fieldset>
447
- <input type="text" class="name" placeholder="お名前">
448
- </fieldset>
449
- <fieldset>
450
- <input type="email" class="email" placeholder="メールアドレス"required="required">
451
- </fieldset>
452
- </div>
453
- <div class="form-right">
454
- <fieldset>
455
- <textarea class="inquiry" placeholder="お問い合わせ内容"></textarea>
456
- </fieldset>
457
- </div>
458
- </div>
459
- <button>submit</button>
460
- </form>
461
- </aside>
462
- <!-- contact us ここまで -->
463
- <!-- footer -->
464
- <footer>
465
- <!-- footer 左がわ -->
466
- <div class="icon">
467
- <img src="img/seedkun.png">
468
- <span class="name"><strong>Seed</strong>Kun</span>
469
- </div>
470
- <!-- footer 右側 -->
471
- <a class="footer-right">Copyright(c)Seedkun inc</a>
472
- </footer>
473
-
474
- <!-- footerここまで -->
475
- </body>
476
- </html>