質問編集履歴

3

文章を修正

2022/03/29 15:55

投稿

suzu1234
suzu1234

スコア41

test CHANGED
File without changes
test CHANGED
@@ -3,8 +3,7 @@
3
3
  原因が全く分からず困っているので解決方法を教えていただきたいです。以下模写コーディングさせてもらっているページです
4
4
  https://code-step.com/demo/html/store1/
5
5
 
6
- q```ここに言語を入力
6
+
7
- コード
8
7
  ```
9
8
  <body>
10
9
  <!------------------------------------------------------------------------->

2

URLを追加

2022/03/29 15:54

投稿

suzu1234
suzu1234

スコア41

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,9 @@
1
1
  レスポンシブデザインに横スクロールが出てしまいます。どこかの要素が横に出てしまっているということはわかるのですが、F12で調べてみてもはみ出している要素がありません。そもそもhtmlやbodyの幅をレスポンシブデザインより狭くしても横スクロールが出てしまいます。
2
2
 
3
- 原因が全く分からず困っているので解決方法を教えていただきたいです。```ここに言語を入力
3
+ 原因が全く分からず困っているので解決方法を教えていただきたいです。以下模写コーディングさせてもらっているページです
4
+ https://code-step.com/demo/html/store1/
5
+
6
+ q```ここに言語を入力
4
7
  コード
5
8
  ```
6
9
  <body>

1

html css レスポンシブデザインを追加

2022/03/29 15:50

投稿

suzu1234
suzu1234

スコア41

test CHANGED
File without changes
test CHANGED
@@ -102,5 +102,299 @@
102
102
 
103
103
  </div>
104
104
  </footer>
105
- </body>```ここに言語を入力
105
+ </body>
106
+
107
+ ```ここに言語を入力
108
+ html {
109
+ font-size: 100%;
110
+ margin: 0;
111
+ padding: 0;
112
+ }
113
+
114
+ img {
115
+ max-width: 100%;
116
+ vertical-align: bottom;
117
+ }
118
+
119
+ body {
120
+ margin: 0;
121
+ padding: 0;
122
+ }
123
+
124
+ li {
125
+ list-style: none;
126
+ }
127
+
128
+ .container {
129
+ max-width: 1050px;
130
+ margin: 0 auto;
131
+ text-align: center;
132
+ }
133
+
106
- コード
134
+ * {
135
+ box-sizing: border-box;
136
+ }
137
+
138
+ a {
139
+ text-decoration: none;
140
+ color: black;
141
+ display: inline-block;
142
+ border: 1px solid black;
143
+ padding: 10px 30px;
144
+ font-size: 12px;
145
+ }
146
+
147
+ a:hover {
148
+ opacity: 0.7;
149
+ }
150
+
151
+ p {
152
+ font-size: 14px;
153
+ }
154
+
155
+ .section-title {
156
+ font-size: 21.5px;
157
+ }
158
+
159
+ /*----------------------------------------------------------------------------*/
160
+ header {
161
+ height: 100vh;
162
+ }
163
+
164
+ .header-container {
165
+ background-image:url(https://gipp.ru/upload/iblock/e9a/e9a05b3b552f13aff8cb037cd3716bfc.jpg);
166
+ background-size: cover;
167
+ height: 100vh;
168
+ }
169
+
170
+ header h1 {
171
+ text-align: right;
172
+ margin: 0px;
173
+ padding: 0px;
174
+ }
175
+
176
+ header img {
177
+ margin: 30px 30px 0px 0px;
178
+ }
179
+
180
+ /*----------------------------------------------------------------------------*/
181
+ .text-wrapper {
182
+ margin: 80px 0px;
183
+ }
184
+
185
+ .text-text {
186
+ padding: 0 220px;
187
+ }
188
+
189
+ .text-text p {
190
+ padding: 0 20px;
191
+ }
192
+
193
+ .text-wrapper img {
194
+ width: 100%;
195
+ }
196
+
197
+ .text-contents {
198
+ display: flex;
199
+ justify-content: space-between;
200
+ margin-top: 40px;
201
+ }
202
+
203
+ .text-contents span {
204
+ font-size: 20px;
205
+ }
206
+
207
+ .archive {
208
+ width: 50%;
209
+ position: relative;
210
+ padding-right: 10px;
211
+ }
212
+
213
+ .archive:hover {
214
+ opacity: 0.7;
215
+ }
216
+
217
+ .archive-text {
218
+ position: absolute;
219
+ top: 50%;
220
+ left: 50%;
221
+ transform: translate(-50%, -50%);
222
+ -webkit-transform: translate(-50%, -50%);
223
+ -ms-transform: translate(-50%, -50%);
224
+ background: rgba(0,0,0,0.5);
225
+ padding: 10px 35px;
226
+ width:300px;
227
+ }
228
+
229
+ .new {
230
+ width: 50%;
231
+ position: relative;
232
+ padding-left: 10px;
233
+ }
234
+
235
+ .new:hover {
236
+ opacity: 0.7;
237
+ }
238
+
239
+
240
+ .new-text {
241
+ position: absolute;
242
+ top: 50%;
243
+ left: 50%;
244
+ transform: translate(-50%, -50%);
245
+ -webkit-transform: translate(-50%, -50%);
246
+ -ms-transform: translate(-50%, -50%);
247
+ background: rgba(0,0,0,0.5);
248
+ padding: 10px 35px;
249
+ width:300px;
250
+ }
251
+
252
+ .text {
253
+ margin: 0;
254
+ padding: 0;
255
+ font-weight: bold;
256
+ color: white;
257
+ }
258
+
259
+
260
+ /*----------------------------------------------------------------------------*/
261
+ .Fashion-Style-wrapper {
262
+ background-image:url(https://www.flaunter.com/wp-content/uploads/2018/11/iabzd-607239-unsplash.jpg);
263
+ background-position: center;
264
+ background-size:cover;
265
+ height: 70vh;
266
+ width: 100%;
267
+ position: relative;
268
+ margin-bottom: 80px;
269
+ }
270
+
271
+ .Fashion-Style-wrapper .container{
272
+ position: absolute;
273
+ left: 0;
274
+ right: 0;
275
+ margin: 40px auto 0px auto;
276
+ padding: 0 240px;
277
+ }
278
+
279
+ /*----------------------------------------------------------------------------*/
280
+ .Catalog-Antique-wrapper {
281
+ background-color: #EEEEEE;
282
+ }
283
+
284
+ .catalog {
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: space-between;
288
+ }
289
+
290
+ .Catalog-Antique-wrapper .container img {
291
+ width: 48%;
292
+ height: 100%;
293
+ }
294
+
295
+ .catalog-text {
296
+ width: 50%;
297
+ padding: 15px;
298
+ height: 100%;
299
+ }
300
+
301
+ .catalog-text p {
302
+ text-align: left;
303
+ }
304
+
305
+ .antique {
306
+ display: flex;
307
+ align-items: center;
308
+ justify-content: space-between;
309
+ margin: 80px 0;
310
+ }
311
+
312
+ .antique-text {
313
+ width: 50%;
314
+ padding: 15px;
315
+ }
316
+
317
+ .antique-text p {
318
+ text-align: left;
319
+ }
320
+
321
+ /*----------------------------------------------------------------------------*/
322
+ footer {
323
+ background-color: #333;
324
+ }
325
+ footer li {
326
+ font-size: 13px;
327
+ margin-bottom: 4px;
328
+ }
329
+
330
+ footer li:first-child {
331
+ margin-bottom: 10px;
332
+ font-weight: bold;
333
+ font-size: 16px;
334
+ }
335
+
336
+ .footer-top {
337
+ display: flex;
338
+ justify-content: space-between;
339
+ align-items: center;
340
+ height: 50vh;
341
+ color: white;
342
+ text-align: left;
343
+ }
344
+
345
+ .footer-bottom {
346
+ text-align: center;
347
+ padding: 23px 0px;
348
+ background-color: white;
349
+ }
350
+
351
+ .footer-bottom p {
352
+ font-size: 10px;
353
+ }
354
+
355
+ ```
356
+
357
+ ```ここに言語を入力
358
+ @media (max-width:896px) {
359
+
360
+ html {
361
+ width: 750px;
362
+ }
363
+
364
+
365
+ .container {
366
+ width: 100%;
367
+ }
368
+
369
+ .text-contents {
370
+ flex-direction: column;
371
+ }
372
+
373
+ .archive {
374
+ width: 90%;
375
+ }
376
+
377
+ .new {
378
+ width: 90%;
379
+ padding-left: 0px;
380
+ }
381
+
382
+ .Catalog-Antique-wrapper .container {
383
+ flex-direction: column;
384
+ }
385
+
386
+ .catalog {
387
+ flex-direction: column;
388
+ }
389
+
390
+ .antique {
391
+ flex-direction: column;
392
+ }
393
+
394
+ .footer-top {
395
+ flex-direction: column;
396
+ }
397
+
398
+ }
399
+ ```
400
+