質問編集履歴

4

追記

2019/12/03 08:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -443,3 +443,13 @@
443
443
  ※display: flex;やdisplay: inline-block;にすると中央寄せにならない上、デザインが崩れます。
444
444
 
445
445
  ※position: fixed;やposition: absolute;にすると中央寄せにならない上、全体のデザインが崩れます。
446
+
447
+
448
+
449
+ 追記
450
+
451
+ 画像のようにしたいです。
452
+
453
+ 現状一番小さい丸と四角が左寄せになっています。
454
+
455
+ ![イメージ説明](8ccf61a660cfceb41b5dab7c1161b9f1.png)

3

修正

2019/12/03 08:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -424,25 +424,13 @@
424
424
 
425
425
 
426
426
 
427
- それぞれboxとtextはfloatで横並びになっています。
428
-
429
- item1と2と3、item4と5はfloatで横並びになっています。
430
-
431
- innerはmargin: auto;で中央寄せにしています。
432
-
433
- inner_item2ではitem4と5の細かい見た目の設定をしています。
434
-
435
- item4と5はitem1と2と3の下にあります。
436
-
437
-
438
-
439
- この上でinner_item1の中で全体を中央寄せにしたいです。
427
+ contents_buttonの中を中央寄せにしたいです。
440
-
441
-
442
-
428
+
429
+
430
+
443
- inner_item1にdisplay: flex;とalign-item:centerをいれたり、margin: 0 auto;を入れたりしましたが変わりませんでした。
431
+ contents_buttonにdisplay: flex;とalign-item:centerをいれたり、margin: 0 auto;を入れたりしましたが変わりませんでした。
444
-
432
+
445
- 現状margin: 0 auto;で若干動いてはいるのですが、全く中央ではありません。
433
+ margin: 0 auto;で若干動いてはいるのですが、中央ではありません。
446
434
 
447
435
 
448
436
 

2

追記

2019/12/03 06:57

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,57 +4,107 @@
4
4
 
5
5
  ```HTML
6
6
 
7
- <div class="inner">
8
-
9
- <div class="inner_item1">
10
-
11
- <div class="item1">
12
-
13
- <div class="box1"></div>
14
-
15
- <div class="text1"></div>
16
-
17
- </div>
18
-
19
- <div class="item2">
20
-
21
- <div class="box2"></div>
22
-
23
- <div class="text2"></div>
24
-
25
- </div>
26
-
27
-     <div class="item3">
28
-
29
- <div class="box3"></div>
30
-
31
- <div class="text3"></div>
32
-
33
- </div>
34
-
35
-
36
-
37
- <div class="inner_item2">
38
-
39
- <div class="item4">
40
-
41
- <div class="box4"></div>
42
-
43
- <div class="text4"></div>
44
-
45
- </div>
46
-
47
- <div class="item5">
48
-
49
- <div class="box5"></div>
50
-
51
- <div class="text5"></div>
52
-
53
- </div>
54
-
55
- </div>
56
-
57
-   </div>
7
+ <div class="contents_button clearfix">
8
+
9
+ <div class="surcle">
10
+
11
+ <div class="inner_button clearfix">
12
+
13
+ <img src="../../image/service_surcle.png" alt="Service"/>
14
+
15
+ <p>Service</p>
16
+
17
+ </div>
18
+
19
+ <div class="inner_button_titile">サービス
20
+
21
+ <span class="inner_button_text">内容</span>
22
+
23
+ </div>
24
+
25
+ </div>
26
+
27
+ <div class="surcle">
28
+
29
+ <div class="inner_button clearfix">
30
+
31
+ <img src="../../image/Information_surcle.png" alt="Information"/>
32
+
33
+ <p class="Information_style">Infor<br><span>mation</span></p>
34
+
35
+ </div>
36
+
37
+ <div class="inner_button_titile">企業情報
38
+
39
+ <span class="inner_button_text">内容</span>
40
+
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <div class="surcle">
46
+
47
+ <div class="inner_button clearfix">
48
+
49
+ <img src="../../image/History_surcle.png" alt="History"/>
50
+
51
+ <p>History</p>
52
+
53
+ </div>
54
+
55
+ <div class="inner_button_titile">沿革
56
+
57
+ <span class="inner_button_text">内容</span>
58
+
59
+ </div>
60
+
61
+ </div>
62
+
63
+
64
+
65
+ <div class="contents_button_second">
66
+
67
+ <div class="surcle">
68
+
69
+ <div class="inner_button clear_box">
70
+
71
+ <img src="../../image/emplovment_surcle.png" alt="Employment"/>
72
+
73
+ <p class="Employment_style">Employ<br><span>ment</span></p>
74
+
75
+ </div>
76
+
77
+ <div class="inner_button_titile">採用情報
78
+
79
+ <span class="inner_button_text">内容</span>
80
+
81
+ </div>
82
+
83
+ </div>
84
+
85
+ <div class="surcle">
86
+
87
+ <div class="inner_button clearfix">
88
+
89
+ <img src="../../image/Contact_surcle.png" alt="Contact"/>
90
+
91
+ <p>Contact</p>
92
+
93
+ </div>
94
+
95
+ <div class="inner_button_titile">お問い合わせ
96
+
97
+ <span class="inner_button_text">内容</span>
98
+
99
+ </div>
100
+
101
+ </div>
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+
58
108
 
59
109
  <!-- 以下コンテンツ内容が続く -->
60
110
 
@@ -64,6 +114,316 @@
64
114
 
65
115
 
66
116
 
117
+ ```CSS
118
+
119
+ .inner_contents{
120
+
121
+ height: 100%;
122
+
123
+ margin: auto;
124
+
125
+ max-width: 95%;
126
+
127
+ }
128
+
129
+
130
+
131
+ .contents_button{
132
+
133
+ width:100%;
134
+
135
+
136
+
137
+ margin: auto;
138
+
139
+ position: relative;
140
+
141
+ }
142
+
143
+
144
+
145
+ .clearfix:after{
146
+
147
+ content: "";
148
+
149
+ clear: both;
150
+
151
+ display: block;
152
+
153
+ }
154
+
155
+
156
+
157
+ @media(max-width: 1200px){
158
+
159
+ .contents_button{
160
+
161
+ display: flex;
162
+
163
+ flex-direction: column;
164
+
165
+ align-items: center;
166
+
167
+ }
168
+
169
+ .surcle{
170
+
171
+ display: flex;
172
+
173
+ justify-content: space-around;
174
+
175
+ width: min-content;
176
+
177
+ }
178
+
179
+ }
180
+
181
+
182
+
183
+ .inner_button{
184
+
185
+ width: 15%;
186
+
187
+ max-width: 230px;
188
+
189
+ min-width: 130px;
190
+
191
+ height: auto;
192
+
193
+ margin-top: 50px;
194
+
195
+ position: relative;
196
+
197
+ float:left;
198
+
199
+ }
200
+
201
+
202
+
203
+ .inner_button img{
204
+
205
+ width: 100%;
206
+
207
+ }
208
+
209
+
210
+
211
+ .inner_button p{
212
+
213
+ position: absolute;
214
+
215
+ color: white;
216
+
217
+ letter-spacing: 6px;
218
+
219
+ font-size: 13px;
220
+
221
+ top: 50%;
222
+
223
+ left: 50%;
224
+
225
+ -ms-transform: translate(-50%,-50%);
226
+
227
+ -webkit-transform: translate(-50%,-50%);
228
+
229
+ transform: translate(-50%,-50%);
230
+
231
+ margin: 0;
232
+
233
+ padding: 0;
234
+
235
+ }
236
+
237
+
238
+
239
+ @media(min-width: 640px){
240
+
241
+ /* 文字 */
242
+
243
+ .inner_button p{
244
+
245
+ font-size: calc(13px + ((1vw - 6.4px)*1.785))
246
+
247
+ }
248
+
249
+ }
250
+
251
+
252
+
253
+ @media(max-width: 1200px){
254
+
255
+ /* 文字 */
256
+
257
+ .inner_button p{
258
+
259
+ font-size: 23px;
260
+
261
+ }
262
+
263
+ }
264
+
265
+
266
+
267
+ .inner_button_titile{
268
+
269
+ color: #797979;
270
+
271
+ width: 15%;
272
+
273
+ height: 15%;
274
+
275
+ max-width: 400px;
276
+
277
+ min-width: 150px;
278
+
279
+ float:left;
280
+
281
+ font-size: 10px;
282
+
283
+ margin: 70px 10px 10px 1%;
284
+
285
+ }
286
+
287
+
288
+
289
+ .inner_button_text{
290
+
291
+ float: left;
292
+
293
+ font-size: 7px;
294
+
295
+ margin-left: 10px;
296
+
297
+ }
298
+
299
+
300
+
301
+ @media(min-width: 640px){
302
+
303
+ /* 文字 */
304
+
305
+ .inner_button_titile{
306
+
307
+ font-size: calc(10px + ((1vw - 6.4px)*1.25))
308
+
309
+ }
310
+
311
+
312
+
313
+ .inner_button_text{
314
+
315
+ font-size: calc(7px + ((1vw - 6.4px)*0.714))
316
+
317
+ }
318
+
319
+ }
320
+
321
+
322
+
323
+ @media(max-width: 1200px){
324
+
325
+ /* 文字 */
326
+
327
+ .inner_button_titile{
328
+
329
+ font-size: 17px;
330
+
331
+ }
332
+
333
+
334
+
335
+ .inner_button_text{
336
+
337
+ font-size: 12px;
338
+
339
+ }
340
+
341
+ }
342
+
343
+
344
+
345
+ /* Information文字指定 */
346
+
347
+ .Information_style span{
348
+
349
+ margin-left: 15%;
350
+
351
+ }
352
+
353
+
354
+
355
+ @media(min-width: 640px){
356
+
357
+
358
+
359
+ .Information_style{
360
+
361
+ font-size: calc(13px + ((1vw - 6.4px)*1.785))
362
+
363
+ }
364
+
365
+ }
366
+
367
+
368
+
369
+ @media(max-width: 1200px){
370
+
371
+
372
+
373
+ .Information_style{
374
+
375
+ font-size: 23px;
376
+
377
+ }
378
+
379
+ }
380
+
381
+
382
+
383
+ /* 各コンテンツボタン 2段目 */
384
+
385
+ .contents_button_second{
386
+
387
+ position: relative;
388
+
389
+ }
390
+
391
+
392
+
393
+ .clear_box{
394
+
395
+ clear: both;
396
+
397
+ }
398
+
399
+
400
+
401
+ .Employment_style span{
402
+
403
+ margin-left: 30%;
404
+
405
+ }
406
+
407
+
408
+
409
+ @media(max-width: 1200px){
410
+
411
+ .contents_button_second{
412
+
413
+ display: flex;
414
+
415
+ flex-direction: column;
416
+
417
+ align-items: center;
418
+
419
+ }
420
+
421
+ }
422
+
423
+ ```
424
+
425
+
426
+
67
427
  それぞれboxとtextはfloatで横並びになっています。
68
428
 
69
429
  item1と2と3、item4と5はfloatで横並びになっています。

1

誤字修正

2019/12/03 06:13

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -78,12 +78,6 @@
78
78
 
79
79
  この上でinner_item1の中で全体を中央寄せにしたいです。
80
80
 
81
-  ○ ○ ○
82
-
83
-   ○ ○
84
-
85
- ↑こういうイメージです。
86
-
87
81
 
88
82
 
89
83
  inner_item1にdisplay: flex;とalign-item:centerをいれたり、margin: 0 auto;を入れたり、しましたが変わりませんでした。