初心者で申し訳ありません。。。
結合したセル内のテキストを中央に揃えたいが『verticalalign=top』が効きません。
###発生している問題・エラーメッセージ
結合したセル内のテキストを中央に揃えたいが『verticalalign=top』が効きません。
エラーメッセージ
###該当のソースコード
<style> table {border-collapse: collapse; width:400px;height:200px;width:100%;table-layout: fixed;} th.test {font-weight:bold;} th.test1 {font-weight:normal;text-align: left; vertical-align: top;} th { width:100%; layout: fixed; font-size: 14px; font-family: "Meiryo",sans-serif; border: solid 1px #666666; color: #000000; background-color: #ff9999; } td { width:100%; layout: fixed; text-align: center; vertical-align: top; font-size: 14px; font-family: "Meiryo",sans-serif; border: solid 1px #666666; color: #000000; background-color: #ffffff; } </style> <table> <thead> <tr> <th class="test"> 1 </th> <th> 2 </th> <th> 3 </th> </tr> </thead> <tbody> <tr> <th class="test1">4 </th> <td> 5 </td> <td> 6 </td> </tr> <tr> <th class="test1"> 7 </th> <td> 8 </td> <td> 9 </td> </tr> <tr> <th class="test1"> 10 </th> <td> 11 </td> <td> 12 </td> </tr> <tr> <th class="test1"> 13 </th> <td> 14 </td> <td> 15 </td> </tr> <tr> <th class="test1"> 16 </th> <td> 17 </td> <td> 18 </td> </tr> <tr> <th class="test1"> 19 </th> <td> 20 </td> <td>21</td> </tr> <tr> <th class="test1"> 22 </th> <td rowspan=3 colspan=3 alignItems=center verticalalign=top >問題の個所</td> </tr> <tr><th class="test1"> 23 </th> </tr> <tr> <th class="test1">24 </th> </tr> </tbody> </table>
###試したこと
###補足情報(言語/FW/ツール等のバージョンなど)
現状のまま、中央に揃えて表示出来れば助かります。
回答2件
あなたの回答
tips
プレビュー