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

質問編集履歴

2

追記

2020/02/05 04:29

投稿

miyawaki
miyawaki

スコア11

title CHANGED
File without changes
body CHANGED
@@ -2,19 +2,231 @@
2
2
 
3
3
 
4
4
  ```
5
- <thead>
6
- <tr class="table-title text-white">
7
- <th scope="col" rowspan="2">word1</th>
8
- <th scope="col" rowspan="2">word2</th>
9
- <th scope="col" rowspan="2">word3</th>
10
- <th scope="col">word4</th>
11
- <th scope="col">word5</th>
12
- <th scope="col">word6</th>
13
- <tr class="table-title text-white">
14
- <th scope="col">word7</th>
15
- <th scope="col" colspan="2">word8</th>
16
- </tr>
17
- </thead>
5
+
6
+ <table class="table table-border">
7
+ <thead>
8
+ <tr class="table-title text-white">
9
+ <th scope="col" rowspan="2">word1</th>
10
+ <th scope="col" rowspan="2">word2</th>
11
+ <th scope="col" rowspan="2">word3</th>
12
+ <th scope="col">word4</th>
13
+ <th scope="col">word5</th>
14
+ <th scope="col">word6</th>
15
+ </tr>
16
+ <tr class="table-title text-white">
17
+ <th scope="col">word7</th>
18
+ <th scope="col" colspan="2">word8</th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <tr class="bg-gray">
23
+ <td height="80" class="py-0" rowspan="2">
24
+ <div class="but-area d-flex justify-content-around">
25
+ <button type="button" >選択</button>
26
+ </div>
27
+ </td>
28
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
29
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
30
+ <td height="40" class="py-0" id='OfficeName'></td>
31
+ <td height="40" class="py-0"></td>
32
+ <td height="40" class="py-0"></td>
33
+ </tr>
34
+ <tr class="bg-gray">
35
+ <td height="40" class="py-0"></td>
36
+ <td height="40" class="py-0" colspan="2"></td>
37
+ </tr>
38
+ <tr class="bg-gray">
39
+ <td height="80" class="py-0" rowspan="2">
40
+ <div class="but-area d-flex justify-content-around">
41
+ <button type="button" >選択</button>
42
+ </div>
43
+ </td>
44
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
45
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
46
+ <td height="40" class="py-0" id='OfficeName'></td>
47
+ <td height="40" class="py-0"></td>
48
+ <td height="40" class="py-0"></td>
49
+ </tr>
50
+ <tr class="bg-gray">
51
+ <td height="40" class="py-0"></td>
52
+ <td height="40" class="py-0" colspan="2"></td>
53
+ </tr>
54
+ <tr class="bg-gray">
55
+ <td height="80" class="py-0" rowspan="2">
56
+ <div class="but-area d-flex justify-content-around">
57
+ <button type="button" >選択</button>
58
+ </div>
59
+ </td>
60
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
61
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
62
+ <td height="40" class="py-0" id='OfficeName'></td>
63
+ <td height="40" class="py-0"></td>
64
+ <td height="40" class="py-0"></td>
65
+ </tr>
66
+ <tr class="bg-gray">
67
+ <td height="40" class="py-0"></td>
68
+ <td height="40" class="py-0" colspan="2"></td>
69
+ </tr>
70
+ <tr class="bg-gray">
71
+ <td height="80" class="py-0" rowspan="2">
72
+ <div class="but-area d-flex justify-content-around">
73
+ <button type="button" >選択</button>
74
+ </div>
75
+ </td>
76
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
77
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
78
+ <td height="40" class="py-0" id='OfficeName'></td>
79
+ <td height="40" class="py-0"></td>
80
+ <td height="40" class="py-0"></td>
81
+ </tr>
82
+ <tr class="bg-gray">
83
+ <td height="40" class="py-0"></td>
84
+ <td height="40" class="py-0" colspan="2"></td>
85
+ </tr>
86
+ <tr class="bg-gray">
87
+ <td height="80" class="py-0" rowspan="2">
88
+ <div class="but-area d-flex justify-content-around">
89
+ <button type="button" >選択</button>
90
+ </div>
91
+ </td>
92
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
93
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
94
+ <td height="40" class="py-0" id='OfficeName'></td>
95
+ <td height="40" class="py-0"></td>
96
+ <td height="40" class="py-0"></td>
97
+ </tr>
98
+ <tr class="bg-gray">
99
+ <td height="40" class="py-0"></td>
100
+ <td height="40" class="py-0" colspan="2"></td>
101
+ </tr>
102
+ <tr class="bg-gray">
103
+ <td height="80" class="py-0" rowspan="2">
104
+ <div class="but-area d-flex justify-content-around">
105
+ <button type="button" >選択</button>
106
+ </div>
107
+ </td>
108
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
109
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
110
+ <td height="40" class="py-0" id='OfficeName'></td>
111
+ <td height="40" class="py-0"></td>
112
+ <td height="40" class="py-0"></td>
113
+ </tr>
114
+ <tr class="bg-gray">
115
+ <td height="40" class="py-0"></td>
116
+ <td height="40" class="py-0" colspan="2"></td>
117
+ </tr>
118
+ <tr class="bg-gray">
119
+ <td height="80" class="py-0" rowspan="2">
120
+ <div class="but-area d-flex justify-content-around">
121
+ <button type="button" >選択</button>
122
+ </div>
123
+ </td>
124
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
125
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
126
+ <td height="40" class="py-0" id='OfficeName'></td>
127
+ <td height="40" class="py-0"></td>
128
+ <td height="40" class="py-0"></td>
129
+ </tr>
130
+ <tr class="bg-gray">
131
+ <td height="40" class="py-0"></td>
132
+ <td height="40" class="py-0" colspan="2"></td>
133
+ </tr>
134
+ <tr class="bg-gray">
135
+ <td height="80" class="py-0" rowspan="2">
136
+ <div class="but-area d-flex justify-content-around">
137
+ <button type="button" >選択</button>
138
+ </div>
139
+ </td>
140
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
141
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
142
+ <td height="40" class="py-0" id='OfficeName'></td>
143
+ <td height="40" class="py-0"></td>
144
+ <td height="40" class="py-0"></td>
145
+ </tr>
146
+ <tr class="bg-gray">
147
+ <td height="40" class="py-0"></td>
148
+ <td height="40" class="py-0" colspan="2"></td>
149
+ </tr>
150
+ <tr class="bg-gray">
151
+ <td height="80" class="py-0" rowspan="2">
152
+ <div class="but-area d-flex justify-content-around">
153
+ <button type="button" >選択</button>
154
+ </div>
155
+ </td>
156
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
157
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
158
+ <td height="40" class="py-0" id='OfficeName'></td>
159
+ <td height="40" class="py-0"></td>
160
+ <td height="40" class="py-0"></td>
161
+ </tr>
162
+ <tr class="bg-gray">
163
+ <td height="40" class="py-0"></td>
164
+ <td height="40" class="py-0" colspan="2"></td>
165
+ </tr>
166
+ <tr class="bg-gray">
167
+ <td height="80" class="py-0" rowspan="2">
168
+ <div class="but-area d-flex justify-content-around">
169
+ <button type="button" >選択</button>
170
+ </div>
171
+ </td>
172
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
173
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
174
+ <td height="40" class="py-0" id='OfficeName'></td>
175
+ <td height="40" class="py-0"></td>
176
+ <td height="40" class="py-0"></td>
177
+ </tr>
178
+ <tr class="bg-gray">
179
+ <td height="40" class="py-0"></td>
180
+ <td height="40" class="py-0" colspan="2"></td>
181
+ </tr>
182
+ <tr class="bg-gray">
183
+ <td height="80" class="py-0" rowspan="2">
184
+ <div class="but-area d-flex justify-content-around">
185
+ <button type="button" >選択</button>
186
+ </div>
187
+ </td>
188
+ <td height="80" class="py-0" id='AgentID' rowspan="2"></td>
189
+ <td height="80" class="py-0" id='AgentName' rowspan="2"></td>
190
+ <td height="40" class="py-0" id='OfficeName'></td>
191
+ <td height="40" class="py-0"></td>
192
+ <td height="40" class="py-0"></td>
193
+ </tr>
194
+ </tbody>
195
+ </table>
196
+
197
+ <style>
198
+
199
+ .table-title {
200
+ height: 40px !important;
201
+ }
202
+ .table-title th {
203
+ padding: 0 !important;
204
+ }
205
+ .table thead th {
206
+ border-top: 0;
207
+ border-bottom: 0;
208
+ }
209
+ .table th {
210
+ background-color: #707070;
211
+ text-align: center;
212
+ padding: 10px 0;
213
+ font-weight: normal;
214
+ }
215
+ thead tr th {
216
+ position: sticky;
217
+ top: 0;
218
+ }
219
+ .table td,
220
+ .table th {
221
+ vertical-align: middle !important;
222
+ }
223
+ .table-border td,
224
+ .table-border th {
225
+ border: 1px solid #707070;
226
+ }
227
+
228
+ </style>
229
+
18
230
  ```
19
231
 
20
232
  ヘッダの中が入れ子構造になっているからだと思いますが、
@@ -30,4 +242,8 @@
30
242
 
31
243
  どのように指定すれば、入れ子構造のヘッダを固定することができるのでしょうか?
32
244
  ご存知の方、教えてくださると幸いです。
245
+ よろしくお願いいたします。
246
+
247
+ 【追記】
248
+ ブラウザ:chromeです。
33
249
  よろしくお願いいたします。

1

誤字

2020/02/05 04:29

投稿

miyawaki
miyawaki

スコア11

title CHANGED
File without changes
body CHANGED
@@ -10,7 +10,7 @@
10
10
  <th scope="col">word4</th>
11
11
  <th scope="col">word5</th>
12
12
  <th scope="col">word6</th>
13
- <tr class="table-title text-white row2">
13
+ <tr class="table-title text-white">
14
14
  <th scope="col">word7</th>
15
15
  <th scope="col" colspan="2">word8</th>
16
16
  </tr>