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

質問編集履歴

4

HTML及びCSS修正

2019/07/02 00:58

投稿

toll_tree
toll_tree

スコア199

title CHANGED
File without changes
body CHANGED
@@ -1,31 +1,91 @@
1
1
  table要素のthへのwidthの指定について、お聞きしたいことがあります。
2
2
  以下は該当のコードになります。
3
3
  ```html
4
+ <!DOCTYPE html>
5
+ <html lang="ja">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <title>情報入力</title>
9
+ <link rel="stylesheet" href="/css/styles.css">
10
+ </head>
11
+ <body>
12
+ <!-- <header>
13
+ <div class="header_top">
14
+ <a class="svg_header_logo" href="http://localhost"></a>
15
+ <p>テスト</p>
16
+ </div>
17
+ <div class="clearfix vets_number">
18
+ <p><span class="font_bold">医院TEL</span><a href="000-0000-0000">000-0000-0000</a></p>
19
+ </div>
20
+ <div class="purpose">
21
+ <p>情報入力</p>
22
+ </div>
23
+ </header> -->
4
- <div class="top_content">
24
+ <div class="top_content">
25
+ <!-- <ul class="page_list">
26
+ <li>
27
+ <i class="check_circle_svg"></i>
28
+ <p>来院目的</p>
29
+ </li>
30
+ <li>»</li>
31
+ <li>
32
+ <i class="check_circle_svg"></i>
33
+ <p>予約日選択</p>
34
+ </li>
35
+ <li>»</li>
36
+ <li>
37
+ <i class="check_circle_svg"></i>
38
+ <p>予約時間選択</p>
39
+ </li>
40
+ <li>»</li>
41
+ <li>
42
+ <i class="black_circle_svg"></i>
43
+ <p>情報入力</p>
44
+ </li>
45
+ <li>»</li>
46
+ <li>
47
+ <i class="circle_svg"></i>
48
+ <p>入力確認</p>
49
+ </li>
50
+ <li>»</li>
51
+ <li>
52
+ <i class="circle_svg"></i>
53
+ <p>登録完了</p>
54
+ </li>
55
+ </ul> -->
5
56
  <div class="input_info_box">
6
57
  <h3 class="infomation_title">下記の情報を入力してください</h3>
7
58
  <table class="input_info_table">
8
59
  <tr><th>来院目的</th><td>初めての来院(初めて〇〇〇動物病院に来院さ…</td></tr>
9
- <tr><th>希望日時</th><td>2019年0615日()10時30分</td></tr>
60
+ <tr><th>希望日時</th><td>2019年0701日()10時00分</td></tr>
10
61
  </table>
11
62
 
12
63
  </div>
64
+
65
+
13
- </div
66
+ </div>
67
+
68
+
69
+
70
+
71
+ </body>
72
+ </html>
14
73
  ```
15
74
  ```css
16
75
  body{
17
76
  margin:0;
18
77
  }
78
+ /*
19
79
  p{
20
80
  margin:0;
21
81
  }
82
+
22
83
  ul{
23
84
  list-style:none;
24
85
  }
25
- .header_top {
86
+ .header_top {
26
87
  width:100%;
27
88
  height:45px;
28
- /* text-align:center; */
29
89
  background-color:#1625d9ad;
30
90
  height:45px;
31
91
  border-bottom:2px solid #497797;
@@ -153,8 +213,8 @@
153
213
  width:100%;
154
214
 
155
215
  }
156
-
216
+ */
157
-
217
+ /*
158
218
  .check_circle_svg{
159
219
  height: 20px;
160
220
  display: block;
@@ -192,11 +252,11 @@
192
252
  .right_reserve_explain{
193
253
  display:inline-block;
194
254
  margin-bottom:5px;
195
- }
255
+ } */
196
256
 
197
- .calendar_table{
257
+ /* .calendar_table{
198
258
  border-collapse: collapse;
199
- border: solid 2px orange;/*表全体を線で囲う*/
259
+ border: solid 2px orange;
200
260
  width:100%;
201
261
  }
202
262
 
@@ -220,9 +280,9 @@
220
280
  border: solid 1px #aa7b34;
221
281
  background: -webkit-linear-gradient(top, #faa200 50%, #ffba54);
222
282
  /* color: #fff; */
223
- border-radius: 3px;
283
+ /* border-radius: 3px;
224
- }
284
+ } */
225
- .next_calendar input[type="submit"]:hover{
285
+ /* .next_calendar input[type="submit"]:hover{
226
286
  background:none;
227
287
  background:-webkit-linear-gradient(top, #ec6b0f 50%, #cf8648)
228
288
  }
@@ -299,10 +359,9 @@
299
359
  background-color: orange;
300
360
  border: solid 1px #aa7b34;
301
361
  background: -webkit-linear-gradient(top, #faa200 50%, #ffba54);
302
- /* color: #fff; */
303
362
  border-radius: 3px;
304
- }
363
+ } */
305
-
364
+ /*
306
365
  .back_calendar input[type="submit"]:hover{
307
366
  background:none;
308
367
  background:-webkit-linear-gradient(top, #ec6b0f 50%, #cf8648);
@@ -370,7 +429,8 @@
370
429
  padding:0;
371
430
  border-right:none;
372
431
  color:red;
373
- }
432
+ } */
433
+
374
434
  table.input_info_table {
375
435
  border-collapse: collapse;
376
436
  border-spacing: 0;
@@ -379,7 +439,6 @@
379
439
  }
380
440
 
381
441
 
382
-
383
442
  .input_info_table th, .input_info_table td {
384
443
  border: 1px solid orange;
385
444
  padding: 3px 10px;
@@ -390,7 +449,7 @@
390
449
  /* border: 1px solid orange; */
391
450
  padding: 3px 10px;
392
451
  background-color: #ffce75;
393
- width: 200px;
452
+ width: 40px;
394
453
  text-align: right;
395
454
  }
396
455
  .input_info_table td {
@@ -399,10 +458,6 @@
399
458
  .input_info_box{
400
459
  text-align:center;
401
460
  }
402
- .top_content{
403
- width:34%;
404
- margin:0 auto;
405
- }
406
461
 
407
462
  ```
408
463
  上記コードを実行した結果は以下になります。
@@ -412,4 +467,7 @@
412
467
  ![イメージ説明](cd5b0f92280a865d31a73392d91c19a1.png)
413
468
  今度はwidthが248pxになりました。確かに、widthは狭くなっているのですが、設定値よりも大きくなってしまっています。
414
469
  こちらの現象につきまして、解決法などご存じの方いらっしゃいましたら、教えて頂きましたら幸いです。
415
- よろしくお願いします。
470
+ よろしくお願いします。
471
+ **追記です**
472
+ 該当の画像のtable部分のHTML,CSS以外の原因の可能性もあります為、全てのHTML及びCSSを記載いたします。
473
+ 該当の部分以外はコメントアウトしてあります。

3

CSS修正

2019/07/02 00:58

投稿

toll_tree
toll_tree

スコア199

title CHANGED
File without changes
body CHANGED
@@ -13,6 +13,364 @@
13
13
  </div
14
14
  ```
15
15
  ```css
16
+ body{
17
+ margin:0;
18
+ }
19
+ p{
20
+ margin:0;
21
+ }
22
+ ul{
23
+ list-style:none;
24
+ }
25
+ .header_top {
26
+ width:100%;
27
+ height:45px;
28
+ /* text-align:center; */
29
+ background-color:#1625d9ad;
30
+ height:45px;
31
+ border-bottom:2px solid #497797;
32
+ }
33
+ .header_top a {
34
+ background:no-repeat;
35
+ display: block;
36
+ height:50px;
37
+ width:11%;
38
+ float:left;
39
+ background-image:url(../images/top_logo.svg);
40
+ }
41
+ .header_top p{
42
+ padding-top:10px;
43
+ text-align:center;
44
+ color:white;
45
+ margin:0;
46
+ padding-right:11%;
47
+ font-weight:bold;
48
+ }
49
+ .clearfix:after{
50
+
51
+ content:"";
52
+ display:block;
53
+ height:0;
54
+ clear:both;
55
+ visibility:hidden;
56
+
57
+ }
58
+
59
+ .vets_number{
60
+ width:100%;
61
+ text-align:center;
62
+ background-color:#f8ce82;
63
+ border-bottom:1px solid #8d8d88d6;
64
+ }
65
+
66
+
67
+ .font_bold{
68
+ font-weight: bold;
69
+ }
70
+
71
+ .vets_number p{
72
+ margin-right:10%;
73
+ }
74
+
75
+ .vets_number a{
76
+ margin-left:15px;
77
+ }
78
+ .purpose{
79
+ width:100%;
80
+ height:40px;
81
+ text-align:center;
82
+ background-color:#bebeb82e;
83
+ border-bottom:1px solid #aaaaa4b8;
84
+ }
85
+ .purpose p {
86
+ line-height:2.5;
87
+
88
+ }
89
+ .black_circle_svg{
90
+ height: 20px;
91
+ display: block;
92
+ width: 20px;
93
+ background:url('../images/black_point.svg');
94
+ }
95
+
96
+ .circle_svg{
97
+ height: 20px;
98
+ display: block;
99
+ width: 20px;
100
+ background:url('../images/circle.svg');
101
+ }
102
+
103
+ .page_list{
104
+ display:flex;
105
+ justify-content: center;
106
+ }
107
+ .page_list li:not(:nth-child(3)):not(:nth-child(5)) i{
108
+ margin-left:16px;
109
+ }
110
+ .page_list li:nth-child(3) i{
111
+ margin-left:25px;
112
+ }
113
+ .page_list li:nth-child(5) i{
114
+ margin-left:30px;
115
+ }
116
+
117
+ .page_list p{
118
+ font-size:0.85em;
119
+ }
120
+
121
+ .top_content{
122
+ width:34%;
123
+ margin:0 auto;
124
+ }
125
+
126
+ .choose_purpose{
127
+ text-align:center;
128
+ font-size:20px;
129
+ }
130
+
131
+ .choose_btn:not(:hover){
132
+ background: -webkit-linear-gradient(top, #f69000 50%, #fdb140);
133
+ }
134
+
135
+ .choose_btn{
136
+ width:70%;
137
+ text-align:left;
138
+ cursor:default;
139
+ margin: 0 auto;
140
+ margin-left: 55px;
141
+ margin-bottom: 8px;
142
+ color: #fff;
143
+ background-color: #ff5e00;
144
+ border-radius: 3px;
145
+ box-shadow: 0px 0px 2px #7e8183e6;
146
+ border:1px solid #c59336;
147
+ font-size:14px;
148
+ display:block;
149
+ text-decoration:none;
150
+ text-shadow:0 1px 0 #ba3a00;
151
+ }
152
+ .index_purpose_button{
153
+ width:100%;
154
+
155
+ }
156
+
157
+
158
+ .check_circle_svg{
159
+ height: 20px;
160
+ display: block;
161
+ width: 20px;
162
+ background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxMy4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDE0OTQ4KSAgLS0+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IiYjeDMwRUM7JiN4MzBBNDsmI3gzMEU0OyYjeDMwRkM7XzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwIDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGNpcmNsZSBzdHlsZT0iZmlsbDojRkZFQkNEO3N0cm9rZTojRUM2QzFGO3N0cm9rZS13aWR0aDozOyIgY3g9IjEwIiBjeT0iMTAiIHI9IjguNSIvPjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwREM0NDI7c3Ryb2tlLXdpZHRoOjM7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7IiB4MT0iNi42IiB5MT0iMTAuOCIgeDI9IjguOCIgeTI9IjEyLjgiLz48bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMERDNDQyO3N0cm9rZS13aWR0aDozO3N0cm9rZS1saW5lY2FwOnJvdW5kOyIgeDE9IjE0LjMiIHkxPSI2LjkiIHgyPSI5LjEiIHkyPSIxMyIvPjwvc3ZnPg==");
163
+ }
164
+
165
+ .calendar_title{
166
+ text-align: center;
167
+ font-size:20px;
168
+ }
169
+ .reserve_explain_box{
170
+ text-align:center;
171
+ border:1px solid orange;
172
+ border-radius:3px;
173
+ }
174
+
175
+ .reserve_explain_box p{
176
+ border-bottom:1px solid #c6c5c5;
177
+ background-color:#ffd17d;
178
+ font-size:20px;
179
+ margin-bottom:7px;
180
+ }
181
+
182
+ .explain_blue_circle{
183
+ color:#6ea1ff;
184
+
185
+ }
186
+ .left_reserve_explain{
187
+ margin-right:90px;
188
+ }
189
+ .is_reservation{
190
+ margin:7px;
191
+ }
192
+ .right_reserve_explain{
193
+ display:inline-block;
194
+ margin-bottom:5px;
195
+ }
196
+
197
+ .calendar_table{
198
+ border-collapse: collapse;
199
+ border: solid 2px orange;/*表全体を線で囲う*/
200
+ width:100%;
201
+ }
202
+
203
+ .next_calendar{
204
+ display:inline-block;
205
+ }
206
+ .calendar_list_title {
207
+ text-align:center;
208
+ margin:10px 0;
209
+ }
210
+ .current_calendar_day{
211
+ display:inline-block;
212
+ text-align:center;
213
+ width:60%;
214
+ margin-left:63px;
215
+ font-size:19px;
216
+ }
217
+ .next_calendar input[type="submit"]{
218
+ padding:3px 38px;
219
+ background-color: orange;
220
+ border: solid 1px #aa7b34;
221
+ background: -webkit-linear-gradient(top, #faa200 50%, #ffba54);
222
+ /* color: #fff; */
223
+ border-radius: 3px;
224
+ }
225
+ .next_calendar input[type="submit"]:hover{
226
+ background:none;
227
+ background:-webkit-linear-gradient(top, #ec6b0f 50%, #cf8648)
228
+ }
229
+
230
+ .day{
231
+ background-color:#FFC746;
232
+ }
233
+ th{
234
+ font-weight:normal;
235
+ }
236
+ .sunday{
237
+ color:red;
238
+ }
239
+ .saturday{
240
+ color:#5796f4;
241
+ }
242
+ td{
243
+
244
+ border : 1px solid orange;
245
+ width:66px;
246
+
247
+ }
248
+
249
+ .reserved_date{
250
+ text-align:center;
251
+ font-size:16px;
252
+ font-weight:800;
253
+ }
254
+
255
+ .calendar_day_p{
256
+ padding-left:5px;
257
+ }
258
+ .calendar_button:hover{
259
+ background:none;
260
+ background:linear-gradient(to bottom,#d3d2d2,silver 50%,#afafaf);
261
+
262
+ }
263
+
264
+ .calendar_button{
265
+ background:linear-gradient(to bottom,#f3f3f3,#e2e2e2 50%,#d1d1d1);
266
+ background-color:#d1d1d1;
267
+ width: 53px;
268
+ height: 31px;
269
+ border: 1px solid silver;
270
+ border-radius:3px;
271
+ margin-left:6px;
272
+ color:#6ea1ff;
273
+ margin-bottom:3px;
274
+
275
+ }
276
+
277
+ .back_button{
278
+ margin: 20px 180px;
279
+ color: white;
280
+ text-shadow: 0 1px 0 #8d0909;
281
+ width: 26%;
282
+ background: linear-gradient(to bottom,#f07e7e,#ec5757 50%,#ff0000);
283
+ border: 1px solid #d1001d;
284
+ border-radius: 3px;
285
+ height: 30px;
286
+ }
287
+
288
+ .back_button:hover{
289
+ background:none;
290
+ background:linear-gradient(to bottom,#db0b0b,#bc3232 50%,#a82e2e);
291
+ }
292
+
293
+ .back_calendar{
294
+ width:20%;
295
+ display:inline-block;
296
+ }
297
+ .back_calendar input[type="submit"]{
298
+ padding:3px 38px;
299
+ background-color: orange;
300
+ border: solid 1px #aa7b34;
301
+ background: -webkit-linear-gradient(top, #faa200 50%, #ffba54);
302
+ /* color: #fff; */
303
+ border-radius: 3px;
304
+ }
305
+
306
+ .back_calendar input[type="submit"]:hover{
307
+ background:none;
308
+ background:-webkit-linear-gradient(top, #ec6b0f 50%, #cf8648);
309
+ }
310
+ .next_title_day{
311
+ width: 31%;
312
+ display: inline-block;
313
+ margin: 0 36% 0 11%;
314
+ font-size: 19px
315
+ }
316
+ .reservation_title_letter{
317
+ text-align:center;
318
+ }
319
+ .reservation_title_letter h3{
320
+ margin-bottom: 7px;
321
+ font-size: 18px;
322
+ }
323
+ .reservation_title_letter p{
324
+ font-weight:600;
325
+ }
326
+
327
+ .is_reservation_time{
328
+ margin:7px;
329
+ color:red;
330
+ }
331
+ .reserve_time_list p{
332
+ display:inline-block;
333
+
334
+ }
335
+ .reserve_status{
336
+ border: 1px solid orange;
337
+ margin-top:20px;
338
+ }
339
+ .reserve_status_left{
340
+ margin-right:30px;
341
+ }
342
+ .reserve_status p{
343
+ background-color: #ffce75;
344
+ padding: 3px 22px 0 22px;
345
+ line-height: 3;
346
+ height: 50px;
347
+ border-right:1px solid orange;
348
+
349
+
350
+
351
+ }
352
+ .reserve_status form{
353
+ display:inline-block;
354
+ width: 145px;
355
+ text-align: center;
356
+ }
357
+
358
+ .flex{
359
+ display: flex;
360
+ }
361
+ .reserved_time_button{
362
+ width:73px;
363
+ height:33px;
364
+ margin:10px 0;
365
+ }
366
+ .reserve_status .no_reservation{
367
+ background:none;
368
+ width: 145px;
369
+ text-align:center;
370
+ padding:0;
371
+ border-right:none;
372
+ color:red;
373
+ }
16
374
  table.input_info_table {
17
375
  border-collapse: collapse;
18
376
  border-spacing: 0;

2

誤字修正

2019/07/02 00:26

投稿

toll_tree
toll_tree

スコア199

title CHANGED
File without changes
body CHANGED
@@ -53,5 +53,5 @@
53
53
  そして、今度はwidthに「40px」と指定しますと以下のようになりました。
54
54
  ![イメージ説明](cd5b0f92280a865d31a73392d91c19a1.png)
55
55
  今度はwidthが248pxになりました。確かに、widthは狭くなっているのですが、設定値よりも大きくなってしまっています。
56
- こちらの現象につきまして、解決法などご存じの方いらっしゃいましたら教えて頂きましたら幸いです。
56
+ こちらの現象につきまして、解決法などご存じの方いらっしゃいましたら教えて頂きましたら幸いです。
57
57
  よろしくお願いします。

1

修正

2019/07/01 18:20

投稿

toll_tree
toll_tree

スコア199

title CHANGED
File without changes
body CHANGED
@@ -53,5 +53,5 @@
53
53
  そして、今度はwidthに「40px」と指定しますと以下のようになりました。
54
54
  ![イメージ説明](cd5b0f92280a865d31a73392d91c19a1.png)
55
55
  今度はwidthが248pxになりました。確かに、widthは狭くなっているのですが、設定値よりも大きくなってしまっています。
56
- こちらの現象につきまして、解決法教えて頂ましたら幸いです。
56
+ こちらの現象につきまして、解決法などご存じの方いらっしゃいましたら教えて頂ましたら幸いです。
57
57
  よろしくお願いします。