2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Qiitaの投稿ではtdタグにborder-topの装飾が付かない

Posted at

theadtbodyを使わない場合

ここはthです ここはtdです
<table>
    <tr>
        <th>ここはthです</th>
        <td>ここはtdです</td>
    </tr>
</table>
  • F12で見るとtdborder-topが装飾されていない

tdtbodyに入れた場合

ここはthです ここはtdです
<table>
    <tr>
        <tbody>
            <th>ここはthです</th>
            <td>ここはtdです</td>
        </tbody>
    </tr>
</table>
  • F12で見ると先ほどと同じようにtdborder-topが装飾されていない

tdtheadに入れた場合

ここはthです ここはtdです
<table>
    <tr>
        <thead>
            <th>ここはthです</th>
            <td>ここはtdです</td>
        </thead>
    </tr>
</table>
  • developper toolでtdを確認してみると.markdownContent thead tdとしてborder-topが装飾されていた
.markdownContent thead td, .markdownContent th {
    font-weight: 700;
    background-color: #fff;
    border-top: solid 1px #d9d9d9;
}

推測

  • .markdownContent thead tdではなく.markdownContent tbody tdに当てるべきところを間違えた?
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?