######試してみたCSS
CSS
1.table>tbody>tr{ 2 display:block; 3 width:50%; 4 float:left; 5}
CSS
1.table>tbody>tr{ 2 display:inline-block; 3 width:50%; 4 float:left; 5}
こちらのコードですと、高さがとれないため
borderが中途半端な長さになってしまいます。
2カラムにして
CSS
1.table>tbody>tr:nth-child(odd){ 2 border-right: 1px solid #f4f4f4; 3}
として、見栄えを良くしたいです。
######現状のコード
HTML
1<table class="table"> 2 <tbody> 3 <tr> 4 <th scope="row">コメントコメントコメント</th> 5 <td>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</td> 6 </tr> 7 <tr> 8 <th scope="row">インタビュアー</th> 9 <td>名前</td> 10 </tr> 11 <tr> 12 <th scope="row">日時</th> 13 <td>2018年2月26日</td> 14 </tr> 15 <tr> 16 <th scope="row">備考</th> 17 <td>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</td> 18 </tr> 19 </tbody> 20 </table>
CSS
1.table { 2 width: 100%; 3 max-width: 100%; 4 border-collapse: collapse; 5 table-layout: fixed; 6} 7 8.table>tbody>tr>th{ 9 border-top: 1px solid #f4f4f4; 10} 11 12.table>tbody>tr>th,.table>tbody>tr>td{ 13 border-top: 1px solid #f4f4f4; 14}
#####追記
画像引用先はコチラです。
回答1件
あなたの回答
tips
プレビュー