質問編集履歴
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -267,3 +267,197 @@
|
|
267
267
|
.nav-listにwidth100%にするとメニュー項目が両端まで広がってしまいます。
|
268
268
|
|
269
269
|
イメージの様に中央にできないのです。
|
270
|
+
|
271
|
+
```CSS
|
272
|
+
|
273
|
+
@charset "utf-8";
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
body{
|
278
|
+
|
279
|
+
margin-right:auto;
|
280
|
+
|
281
|
+
margin-left:auto;
|
282
|
+
|
283
|
+
height: 100%;
|
284
|
+
|
285
|
+
}
|
286
|
+
|
287
|
+
.wf-notosansjapanese { font-family:"-apple-system","BlinkMacSystemFont","Noto Sans JP","Meiryo","游ゴシック","ヒラギノ角ゴ ProN",sans-serif;}
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
.headline {
|
292
|
+
|
293
|
+
display: flex;
|
294
|
+
|
295
|
+
width: 100%;
|
296
|
+
|
297
|
+
margin-top: 30px;
|
298
|
+
|
299
|
+
margin-bottom: 0;
|
300
|
+
|
301
|
+
margin-left: 10px;
|
302
|
+
|
303
|
+
justify-content: space-between;
|
304
|
+
|
305
|
+
align-items: baseline;
|
306
|
+
|
307
|
+
list-style-type:none;
|
308
|
+
|
309
|
+
}
|
310
|
+
|
311
|
+
.headline p{
|
312
|
+
|
313
|
+
font-size:30px;
|
314
|
+
|
315
|
+
margin-top:0;
|
316
|
+
|
317
|
+
font-weight: bold;
|
318
|
+
|
319
|
+
text-align: right;
|
320
|
+
|
321
|
+
margin-bottom: 0;
|
322
|
+
|
323
|
+
vertical-align: middle;
|
324
|
+
|
325
|
+
}
|
326
|
+
|
327
|
+
.nav-list{
|
328
|
+
|
329
|
+
padding: 35px 0 5px 0 25px;
|
330
|
+
|
331
|
+
margin-top: 3px;
|
332
|
+
|
333
|
+
margin-bottom: 15px;
|
334
|
+
|
335
|
+
font-size:16px;
|
336
|
+
|
337
|
+
display : flex;
|
338
|
+
|
339
|
+
display : -webkit-box; /* old Android */
|
340
|
+
|
341
|
+
display : -webkit-flex; /* Safari etc. */
|
342
|
+
|
343
|
+
display : -ms-flexbox; /* IE10 */
|
344
|
+
|
345
|
+
display: -o-box; /* Opera */
|
346
|
+
|
347
|
+
display: box; /* ベンダープレフィックスなし */
|
348
|
+
|
349
|
+
justify-content:center;
|
350
|
+
|
351
|
+
list-style-type:none;
|
352
|
+
|
353
|
+
align-items:center;
|
354
|
+
|
355
|
+
max-width: 100%;
|
356
|
+
|
357
|
+
width: 1040px;
|
358
|
+
|
359
|
+
margin: 0 auto;
|
360
|
+
|
361
|
+
}
|
362
|
+
|
363
|
+
.nav-list li a {
|
364
|
+
|
365
|
+
text-decoration: none;
|
366
|
+
|
367
|
+
color: #FFFFFF;
|
368
|
+
|
369
|
+
background-color: #0000FF;
|
370
|
+
|
371
|
+
display: block;
|
372
|
+
|
373
|
+
padding: 5px;
|
374
|
+
|
375
|
+
}
|
376
|
+
|
377
|
+
.nav-list li:hover a {
|
378
|
+
|
379
|
+
background-color: #000080;
|
380
|
+
|
381
|
+
}
|
382
|
+
|
383
|
+
.nav-list li:hover ul {
|
384
|
+
|
385
|
+
display: block;
|
386
|
+
|
387
|
+
}
|
388
|
+
|
389
|
+
.nav-list li ul {
|
390
|
+
|
391
|
+
margin: 0px;
|
392
|
+
|
393
|
+
padding: 0px;
|
394
|
+
|
395
|
+
list-style-type: none;
|
396
|
+
|
397
|
+
display: none;
|
398
|
+
|
399
|
+
width:20%;
|
400
|
+
|
401
|
+
position: absolute;
|
402
|
+
|
403
|
+
z-index:100;
|
404
|
+
|
405
|
+
}
|
406
|
+
|
407
|
+
.nav-list li:hover ul{display: block;}
|
408
|
+
|
409
|
+
.nav-list li ul a {
|
410
|
+
|
411
|
+
display: block;
|
412
|
+
|
413
|
+
text-decoration: none;
|
414
|
+
|
415
|
+
color: #FFFFFF;
|
416
|
+
|
417
|
+
background-color: #0000FF;
|
418
|
+
|
419
|
+
}
|
420
|
+
|
421
|
+
.nav-list li ul li:hover a {
|
422
|
+
|
423
|
+
background-color: #008080;
|
424
|
+
|
425
|
+
}
|
426
|
+
|
427
|
+
.nav-list:after {
|
428
|
+
|
429
|
+
content: "";
|
430
|
+
|
431
|
+
clear: both;
|
432
|
+
|
433
|
+
display: block;
|
434
|
+
|
435
|
+
}
|
436
|
+
|
437
|
+
.top-nav{
|
438
|
+
|
439
|
+
width:20%;
|
440
|
+
|
441
|
+
font-size:20px;
|
442
|
+
|
443
|
+
text-align: center;
|
444
|
+
|
445
|
+
border-right: 2px solid;
|
446
|
+
|
447
|
+
border-color:#ffffff;
|
448
|
+
|
449
|
+
background: #0000FF;
|
450
|
+
|
451
|
+
}
|
452
|
+
|
453
|
+
.top-nav a{
|
454
|
+
|
455
|
+
display: inline-block;
|
456
|
+
|
457
|
+
text-decoration: solid;
|
458
|
+
|
459
|
+
height: 25px;
|
460
|
+
|
461
|
+
}
|
462
|
+
|
463
|
+
```
|
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -263,3 +263,7 @@
|
|
263
263
|
height: 25px;
|
264
264
|
|
265
265
|
```
|
266
|
+
|
267
|
+
.nav-listにwidth100%にするとメニュー項目が両端まで広がってしまいます。
|
268
|
+
|
269
|
+
イメージの様に中央にできないのです。
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,263 @@
|
|
3
3
|
上記がイメージです。グローバルナビゲーションで中央に配置するようにして両サイドはブラウザの端まで続くようにしたいです。
|
4
4
|
|
5
5
|
ご助言お願いします
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
```HTML
|
10
|
+
|
11
|
+
<!DOCTYPE html>
|
12
|
+
|
13
|
+
<html lang="ja">
|
14
|
+
|
15
|
+
<head>
|
16
|
+
|
17
|
+
<meta charset="utf-8">
|
18
|
+
|
19
|
+
<meta name="description" content="">
|
20
|
+
|
21
|
+
<link href="css/reset.css" rel="stylesheet" type="text/css" madia="screen">
|
22
|
+
|
23
|
+
<link href="css/style.css" rel="stylesheet" type="text/css" madia="screen">
|
24
|
+
|
25
|
+
<link href="css/topindex.css" rel="stylesheet" type="text/css" madia="screen">
|
26
|
+
|
27
|
+
<link rel="shortcut icon" href="/favicon.ico">
|
28
|
+
|
29
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
30
|
+
|
31
|
+
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP" rel="stylesheet">
|
32
|
+
|
33
|
+
<title>*******************************************</title>
|
34
|
+
|
35
|
+
</head>
|
36
|
+
|
37
|
+
<body>
|
38
|
+
|
39
|
+
<div class="wrapper01">
|
40
|
+
|
41
|
+
<header>
|
42
|
+
|
43
|
+
<!-- header-->
|
44
|
+
|
45
|
+
<div class="headline">
|
46
|
+
|
47
|
+
<a href="./"><img src="images/rogo.svg" alt="コーポレートマーク"></a>
|
48
|
+
|
49
|
+
<p class="syamei">********************</p>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
</head>
|
54
|
+
|
55
|
+
<body>
|
56
|
+
|
57
|
+
<div class="wrapper01">
|
58
|
+
|
59
|
+
<header>
|
60
|
+
|
61
|
+
<!-- header-->
|
62
|
+
|
63
|
+
<div class="headline">
|
64
|
+
|
65
|
+
<a href="./"><img src="images/rogo.svg" alt="コーポレートマーク"></a>
|
66
|
+
|
67
|
+
<p class="syamei">***********</p>
|
68
|
+
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<nav class="main-nav">
|
72
|
+
|
73
|
+
<ul class="nav-list">
|
74
|
+
|
75
|
+
<li class="top-nav"><a href="./">*********</a></li>
|
76
|
+
|
77
|
+
<li class="top-nav"><a href="#">********</a>
|
78
|
+
|
79
|
+
<ul>
|
80
|
+
|
81
|
+
<li><a href="#">******</a></li>
|
82
|
+
|
83
|
+
<li><a href="#">*****</a></li>
|
84
|
+
|
85
|
+
<li><a href="#"></a></li>
|
86
|
+
|
87
|
+
</ul>
|
88
|
+
|
89
|
+
</li>
|
90
|
+
|
91
|
+
<li class="top-nav"><a href="******************************">お問い合わせ</a></li>
|
92
|
+
|
93
|
+
<li class="top-nav"><a href="*****************/./">よくある質問</a></li>
|
94
|
+
|
95
|
+
<li class="top-nav"><a href="***************/./">採用</a></li>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
|
99
|
+
</nav>
|
100
|
+
|
101
|
+
</header>
|
102
|
+
|
103
|
+
<!-- /header -->
|
104
|
+
|
105
|
+
<main>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<div class="topimages">
|
110
|
+
|
111
|
+
<img src="images/top.jpg" alt="top画">
|
112
|
+
|
113
|
+
<p>****************************************</p>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</main>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
</body>
|
122
|
+
|
123
|
+
</html>
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
```CSS
|
130
|
+
|
131
|
+
.nav-list{
|
132
|
+
|
133
|
+
padding: 35px 0 5px 0 25px;
|
134
|
+
|
135
|
+
margin-top: 3px;
|
136
|
+
|
137
|
+
margin-bottom: 15px;
|
138
|
+
|
139
|
+
font-size:16px;
|
140
|
+
|
141
|
+
display : flex;
|
142
|
+
|
143
|
+
display : -webkit-box; /* old Android */
|
144
|
+
|
145
|
+
display : -webkit-flex; /* Safari etc. */
|
146
|
+
|
147
|
+
display : -ms-flexbox; /* IE10 */
|
148
|
+
|
149
|
+
display: -o-box; /* Opera */
|
150
|
+
|
151
|
+
display: box; /* ベンダープレフィックスなし */
|
152
|
+
|
153
|
+
justify-content:center;
|
154
|
+
|
155
|
+
list-style-type:none;
|
156
|
+
|
157
|
+
align-items:center;
|
158
|
+
|
159
|
+
margin: 0 auto;
|
160
|
+
|
161
|
+
width: 1040px;
|
162
|
+
|
163
|
+
max-width: 100%;
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
.nav-list li a {
|
170
|
+
|
171
|
+
text-decoration: none;
|
172
|
+
|
173
|
+
color: #FFFFFF;
|
174
|
+
|
175
|
+
background-color: #0000FF;
|
176
|
+
|
177
|
+
display: block;
|
178
|
+
|
179
|
+
padding: 5px;
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
.nav-list li:hover a {
|
184
|
+
|
185
|
+
background-color: #000080;
|
186
|
+
|
187
|
+
}
|
188
|
+
|
189
|
+
.nav-list li:hover ul {
|
190
|
+
|
191
|
+
display: block;
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
.nav-list li ul {
|
196
|
+
|
197
|
+
margin: 0px;
|
198
|
+
|
199
|
+
padding: 0px;
|
200
|
+
|
201
|
+
list-style-type: none;
|
202
|
+
|
203
|
+
display: none;
|
204
|
+
|
205
|
+
width:20%;
|
206
|
+
|
207
|
+
position: absolute;
|
208
|
+
|
209
|
+
z-index:100;
|
210
|
+
|
211
|
+
}
|
212
|
+
|
213
|
+
.nav-list li:hover ul{display: block;}
|
214
|
+
|
215
|
+
.nav-list li ul a {
|
216
|
+
|
217
|
+
display: block;
|
218
|
+
|
219
|
+
text-decoration: none;
|
220
|
+
|
221
|
+
color: #FFFFFF;
|
222
|
+
|
223
|
+
background-color: #0000FF;
|
224
|
+
|
225
|
+
}
|
226
|
+
|
227
|
+
.nav-list li ul li:hover a {
|
228
|
+
|
229
|
+
background-color: #008080;
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
.nav-list:after {
|
234
|
+
|
235
|
+
content: "";
|
236
|
+
|
237
|
+
clear: both;
|
238
|
+
|
239
|
+
display: block;
|
240
|
+
|
241
|
+
}
|
242
|
+
|
243
|
+
.top-nav{
|
244
|
+
|
245
|
+
width:20%;
|
246
|
+
|
247
|
+
font-size:20px;
|
248
|
+
|
249
|
+
text-align: center;
|
250
|
+
|
251
|
+
border-right: 2px solid;
|
252
|
+
|
253
|
+
border-color:#ffffff;
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
.top-nav a{
|
258
|
+
|
259
|
+
display: inline-block;
|
260
|
+
|
261
|
+
text-decoration: solid;
|
262
|
+
|
263
|
+
height: 25px;
|
264
|
+
|
265
|
+
```
|