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

質問編集履歴

5

CSSをcodeで追記しました。

2016/12/04 04:05

投稿

sakura_k
sakura_k

スコア8

title CHANGED
File without changes
body CHANGED
@@ -104,4 +104,392 @@
104
104
  </footer>
105
105
  </body>
106
106
  </html>
107
+ ```
108
+
109
+ CSSを載せます。
110
+
111
+
112
+ ```CSS
113
+ @charset "utf-8";
114
+
115
+ /* all reset */
116
+ html {
117
+ height: 100%;
118
+ }
119
+
120
+ body {
121
+ width: 100%;
122
+ height: 100%;
123
+ margin: 0;
124
+ padding: 0;
125
+ font-family: "MS ゴシック",sans-serif,"Hiragino Kaku Gothic Pro",Meiryo, Osaka,"MS PGothic", sans-serif;
126
+ clear: both;
127
+ }
128
+
129
+ img {
130
+ margin: 0;
131
+ padding: 0;
132
+ }
133
+
134
+ /* wrapper */
135
+ /* 1366(横) * 768(縦) */
136
+ #wrapper {
137
+ background-color: skyblue;
138
+ width: 100%;
139
+ margin: auto;
140
+ margin-top: 30px;
141
+ padding: auto;
142
+ border-top: solid 1px black;
143
+ border-left: solid 1px black;
144
+ border-bottom: solid 1px black;
145
+ }
146
+
147
+ /* section */
148
+ section {
149
+ float: right;
150
+ clear: both;
151
+ width: 75%;
152
+ height: 100%;
153
+ margin-bottom: 20px;
154
+ line-height: 2em;
155
+ border-right: solid 1px black;
156
+ }
157
+
158
+ section .chatroom_section {
159
+ margin: auto;
160
+ padding: auto;
161
+ text-align: center;
162
+ line-height: 1.5em;
163
+ width: 95%;
164
+ height: 515px;
165
+ overflow-y: scroll;
166
+ border: solid 1px black;
167
+ background-color: #fafafa;
168
+ clear: both;
169
+ }
170
+
171
+
172
+ section .chatroom_section .chatroom_say_left {
173
+ float: left;
174
+ margin: 0;
175
+ padding: 0;
176
+ width: 20%;
177
+ height: 15%;
178
+ clear: both;
179
+ }
180
+
181
+ section .chatroom_section .chatroom_say_left p {
182
+ color: #5a5a5a;
183
+ margin: 0;
184
+ padding: 0;
185
+ padding-top: 40px;
186
+ font-size: 10px;
187
+ clear: both;
188
+ }
189
+
190
+ section .chatroom_section .chatroom_say_left #chatroom_left_img {
191
+ margin: 0;
192
+ padding: 0;
193
+ padding-top: 5px;
194
+ width: 35%;
195
+ height: 50%;
196
+ clear: both;
197
+ }
198
+
199
+ section .chatroom_section .chatroom_say_front {
200
+ float: left;
201
+ width: 80%;
202
+ padding-top: 40px;
203
+ }
204
+
205
+ section .chatroom_section .chatroom_say_front_right {
206
+ float: left;
207
+ width: 80%;
208
+ }
209
+
210
+ .chatroom_say_right {
211
+ float: right;
212
+ margin: 0;
213
+ width: 20%;
214
+ height: 15%;
215
+ }
216
+
217
+ .chatroom_say_right p {
218
+ color: #5a5a5a;
219
+ margin: 0;
220
+ padding: 0;
221
+ padding-top: 10px;
222
+ font-size: 10px;
223
+ }
224
+
225
+ .chatroom_right_img {
226
+ margin: 0;
227
+ padding: 0;
228
+ padding-top: 5px;
229
+ width: 35%;
230
+ clear: both;
231
+ }
232
+
233
+ .day {
234
+ clear: both;
235
+ }
236
+
237
+ .day p {
238
+ color: #808080;
239
+ font-size: 12px;
240
+ }
241
+
242
+ .day hr {
243
+ width: 95%;
244
+ }
245
+
246
+ section h2#h2_section {
247
+ margin-top: 40px;
248
+ margin-left: 25px;
249
+ }
250
+
251
+ section #chatroom_config {
252
+ margin: auto;
253
+ margin-top: 10px;
254
+ padding: auto;
255
+ width: 95%;
256
+ clear: both;
257
+ }
258
+
259
+ section #chatroom_config #chatroom_top {
260
+ margin: auto;
261
+ padding: auto;
262
+ width: 100%;
263
+ height: 45%;
264
+ border: solid 1px black;
265
+ text-align: center;
266
+ }
267
+
268
+ /* section chatroom_bottom */
269
+ section #chatroom_config #chatroom_bottom {
270
+ margin: auto;
271
+ margin-top: 10px;
272
+ padding: auto;
273
+ width: 100%;
274
+ height: 85px;
275
+ text-align: center;
276
+ border: solid 1px black;
277
+ clear: both;
278
+ }
279
+
280
+ section #chatroom_config #chatroom_bottom #chatroom_bottom_left {
281
+ float: left;
282
+ width: 30%;
283
+ height: 100%;
284
+ margin: auto;
285
+ padding: auto;
286
+ clear: both;
287
+ }
288
+
289
+ section #chatroom_config #chatroom_bottom #chatroom_bottom_left #chatroom_img {
290
+ margin-left: 20px;
291
+ width: 22%;
292
+ float: left;
293
+ }
294
+
295
+ #square_color {
296
+ color: cyan;
297
+ }
298
+
299
+ section #chatroom_config #chatroom_bottom #chatroom_bottom_right {
300
+ float: right;
301
+ width: 70%;
302
+ height: 76px;
303
+ margin: auto;
304
+ margin-top: 5px;
305
+ padding: auto;
306
+ }
307
+
308
+ section #chatroom_config #chatroom_bottom #chatroom_bottom_right textarea {
309
+ width: 80%;
310
+ height: 70px;
311
+ margin: auto;
312
+ padding: auto;
313
+ }
314
+
315
+ /* section submit */
316
+ section button#section_submit {
317
+ float: right;
318
+ margin-top: 20px;
319
+ margin-right: 20px;
320
+ padding: 5px;
321
+ background-color: #ffff7f;
322
+ clear: both;
323
+ }
324
+
325
+ /* form */
326
+
327
+ textarea#chatroom_info {
328
+ float: left;
329
+ font-size: 15px;
330
+ }
331
+
332
+ textarea#chatroom_info:focus {
333
+ background-color: pink;
334
+ }
335
+
336
+ button#sendsubmit {
337
+ width: 15%;
338
+ height: 70px;
339
+ margin-top: 3px;
340
+ background-color: #84c1ff ;
341
+ font-size: 20px;
342
+ }
343
+
344
+ button#sendsubmit:hover {
345
+ color: white;
346
+ font-size: 25px;
347
+ font-style: italic;
348
+ text-shadow: 3px 3px 5px deeppink;
349
+ background-color: firebrick;
350
+ }
351
+
352
+ /* aside */
353
+ aside {
354
+ float: left;
355
+ width: 23%;
356
+ height: 758px;
357
+ padding-top: 1px;
358
+ line-height: 1.5em;
359
+ text-align: center;
360
+ border-right: solid 1px black;
361
+ border-bottom: solid 1px black;
362
+ }
363
+
364
+ aside #over {
365
+ background-color: green;
366
+ height: 700px;
367
+ overflow-y: scroll;
368
+ width: 98%;
369
+ margin-left: 1%;
370
+ }
371
+
372
+ aside .front_aside {
373
+ width: 90%;
374
+ margin: auto;
375
+ padding: auto;
376
+ padding-top: 1px;
377
+ clear: both;
378
+ border-bottom: solid 1px black;
379
+ background-color: yellow;
380
+ }
381
+
382
+ aside .front_aside .left_aside {
383
+ float: left;
384
+ margin: auto;
385
+ margin-top: 4px;
386
+ padding: auto;
387
+ width: 40%;
388
+ clear: both;
389
+ }
390
+
391
+ aside .front_aside .left_aside .img_aside {
392
+ margin: 0;
393
+ padding: 0;
394
+ width: 60%;
395
+ height: 100%;
396
+ }
397
+
398
+ aside .front_aside .right_aside {
399
+ float: right;
400
+ margin: auto;
401
+ margin-top: 20px;
402
+ padding: auto;
403
+ width: 60%;
404
+ }
405
+
406
+ aside .front_aside .right_aside .rightaside_states {
407
+ color: cyan;
408
+ }
409
+
410
+ /* footer */
411
+ footer {
412
+ width: 90%;
413
+ height: 90%;
414
+ margin: auto;
415
+ margin-bottom: 35px;
416
+ padding: auto;
417
+ padding-top: 20px;
418
+ clear: both;
419
+ }
420
+
421
+ footer hr {
422
+ margin-top: 20px;
423
+ margin-bottom: 35px;
424
+ clear: both;
425
+ }
426
+
427
+ /* link */
428
+ a:link {
429
+
430
+ }
431
+
432
+ a:visited {
433
+
434
+ }
435
+
436
+ a:focus {
437
+
438
+ }
439
+
440
+ a:hover {
441
+
442
+ }
443
+
444
+ a:active {
445
+
446
+ }
447
+
448
+ /* 吹き出し 左 */
449
+ section .chatroom_section .chatroom_say_front .balloon-1-left {
450
+ display: inline-block; /* コメントの文字数に合わせて可変 */
451
+ padding: 15px 20px;
452
+ margin-top: 8px;
453
+ margin-right: 80px;
454
+ border-radius: 30px;
455
+ position: relative;
456
+ background-color: #D9F0FF;
457
+ text-align: left;
458
+ width: 80%;
459
+ }
460
+
461
+ section .chatroom_section .chatroom_say_front .balloon-1-left:after {
462
+ content: "";
463
+ position: absolute;
464
+ top: 20px; left: -30px;
465
+ margin-top: -10px;
466
+ display: block;
467
+ width: 0px;
468
+ height: 0px;
469
+ border-style: solid;
470
+ border-width: 40px 40px 40px 0px;
471
+ border-color: transparent #D9F0FF transparent transparent;
472
+ }
473
+
474
+ /* 吹き出し 右 */
475
+ section .chatroom_section .chatroom_say_front_right .balloon-2-right {
476
+ display: inline-block; /* コメントの文字数に合わせて可変する処理 */
477
+ padding: 15px 0px 15px 15px ;
478
+ margin-left: 50px;
479
+ border-radius: 30px;
480
+ position: relative;
481
+ text-align: left;
482
+ background: #ffa3d1;
483
+ width: 80%;
484
+ }
485
+
486
+ .balloon-2-right:before {
487
+ content: "";
488
+ position: absolute;
489
+ top: 10%; right: -70px; /* 三角の吹き出し部分の位置を決める */
490
+ display: block;
491
+ border-style: solid;
492
+ border-width: 40px 40px 40px 40px;
493
+ border-color: transparent transparent transparent #ffa3d1;
494
+ }
107
495
  ```

4

勘違いしてました。<code>ボタンを押下して、codeに直しました

2016/12/04 04:05

投稿

sakura_k
sakura_k

スコア8

title CHANGED
File without changes
body CHANGED
@@ -16,7 +16,8 @@
16
16
 
17
17
  HTMLを載せます。
18
18
 
19
+
19
- <code>
20
+ ```HTML5
20
21
  <!DOCTYPE html>
21
22
  <html lang="ja">
22
23
  <head>
@@ -103,4 +104,4 @@
103
104
  </footer>
104
105
  </body>
105
106
  </html>
106
- </code>
107
+ ```

3

<code>で囲みました!

2016/12/04 02:50

投稿

sakura_k
sakura_k

スコア8

title CHANGED
File without changes
body CHANGED
@@ -15,6 +15,8 @@
15
15
  宜しくお願いいたします。。
16
16
 
17
17
  HTMLを載せます。
18
+
19
+ <code>
18
20
  <!DOCTYPE html>
19
21
  <html lang="ja">
20
22
  <head>
@@ -100,4 +102,5 @@
100
102
  Copyright&nbsp;&copy;
101
103
  </footer>
102
104
  </body>
103
- </html>
105
+ </html>
106
+ </code>

2

HTMLを載せました。

2016/12/04 02:48

投稿

sakura_k
sakura_k

スコア8

title CHANGED
File without changes
body CHANGED
@@ -11,22 +11,93 @@
11
11
  レスポンシブさせようとしているのですが、
12
12
  どうしても「高さ」がレスポンシブ対応になりません。。
13
13
 
14
- .example {
15
- width: 100%;
14
+ どうかご教示いただけましたら幸いです。
16
- height: 100%;
15
+ 宜しくお願いいたします。。
17
- }
18
16
 
17
+ HTMLを載せます。
18
+ <!DOCTYPE html>
19
+ <html lang="ja">
20
+ <head>
21
+ <meta charset="utf-8">
22
+ <link rel="stylesheet" href="css/style.css">
23
+ </head>
24
+ <body>
25
+ <div id="wrapper">
26
+ <section>
27
+ <form action="#" method="post">
28
+ <button type="submit" id="section_submit">ログアウト</button>
29
+ </form>
30
+ <h2 id="h2_section">eee</h2>
31
+ <div class="chatroom_section">
32
+ <div class="chatroom_say_left">
19
- html {
33
+ <p>
34
+ TO<br>
35
+ <img src="images/flower2.jpeg" alt="花" id="chatroom_left_img"><br>
36
+ </p>
37
+ </div>
38
+ <div class="chatroom_say_front">
39
+ <p class="balloon-1-left">
40
+ 行間は「1.5em(20pxくらい)」<br>
41
+ </p>
42
+ </div>
43
+ <div class="chatroom_say_front_right">
44
+ <p class="balloon-2-right">
45
+ 左と同じ
46
+ </p>
47
+ </div>
48
+ <div class="chatroom_say_right">
49
+ <p>
20
- height: 100%;
50
+ TO:<br>
51
+ <img src="images/flower.png" alt="花" class="chatroom_right_img"><br>
21
- }
52
+ </p>
22
-
53
+ </div>
54
+ <div class="day">
55
+ <p>2016/11/21(月)<br><hr></p>
56
+ </div>
57
+ </div>
58
+ <div id="chatroom_config">
59
+ <div id="chatroom_top">
23
- body {
60
+ 仮ボックス
61
+ </div>
62
+ <div id="chatroom_bottom">
63
+ <div id="chatroom_bottom_left">
64
+ <p><img src="images/flower4.png" alt="花" id="chatroom_img"></p>
65
+ <p>
66
+ 佐藤、鈴木<br>
67
+ <span id="square_color">■</span>&nbsp;なんか入れる
68
+ </p>
69
+ </div>
70
+ <div id="chatroom_bottom_right">
71
+ <form action="#" method="post" id="chatroom_sendform">
24
- height: 100%;
72
+ <label>
25
- }
26
-
27
- こちらの上記のような記述の仕方をしていますが、
73
+ <textarea name="chatroom_send_info" placeholder=""
74
+ id="chatroom_info" form="chatroom_sendform" maxlength="1001" required></textarea>
28
- こちらでは上手くいかないのでしょうか?
75
+ </label>
76
+ <button type="submit" id="sendsubmit">example</button>
77
+ </form>
78
+ </div>
79
+ </div>
80
+ </div>
29
- どこかピクセル指定しているとダメなんでしょうか??
81
+ </section>
30
-
82
+ <aside>
83
+ <h2 id="aside_h2">イメージ一覧</h2>
84
+ <div id="over">
85
+ <div class="front_aside">
86
+ <div class="left_aside">
87
+ <p><img src="images/flower.png" alt="花" class="img_aside"></p>
88
+ </div>
89
+ <div class="right_aside">
90
+ <p>
91
+ 花子
92
+ </p>
93
+ </div>
94
+ </div>
95
+ </div>
31
- どうかご教示いただけましたら幸いです。
96
+ </aside>
97
+ </div>
32
- 宜しくお願いいたします。。
98
+ <footer>
99
+ <hr>
100
+ Copyright&nbsp;&copy;
101
+ </footer>
102
+ </body>
103
+ </html>

1

文章を修正しました。

2016/12/02 06:24

投稿

sakura_k
sakura_k

スコア8

title CHANGED
File without changes
body CHANGED
@@ -2,6 +2,11 @@
2
2
  助けてください。。
3
3
 
4
4
  HTML5で現在、レスポンシブ対応のサイトを作っています。
5
+
6
+ ウインドウを縦、横に動かしてもサイトがその幅に合わせて伸縮するといいますか、
7
+ あんまり文章が思いつかず申し訳ないですが、
8
+ そのようなことをしたいのです。
9
+
5
10
  その際、CSSで幅と高さを%表示にて
6
11
  レスポンシブさせようとしているのですが、
7
12
  どうしても「高さ」がレスポンシブ対応になりません。。
@@ -11,8 +16,17 @@
11
16
  height: 100%;
12
17
  }
13
18
 
19
+ html {
20
+ height: 100%;
21
+ }
22
+
23
+ body {
24
+ height: 100%;
25
+ }
26
+
14
27
  こちらの上記のような記述の仕方をしていますが、
15
28
  こちらでは上手くいかないのでしょうか?
29
+ どこかピクセル指定しているとダメなんでしょうか??
16
30
 
17
31
  どうかご教示いただけましたら幸いです。
18
32
  宜しくお願いいたします。。