How to center a checkbox in a table cell?

后端 未结 10 1360
盖世英雄少女心
盖世英雄少女心 2020-12-05 03:57

The cell contains nothing but a checkbox. It is rather wide because of text in the table header row. How do I center the checkbox (with inline CSS in my HTML? (I know))

10条回答
  •  难免孤独
    2020-12-05 04:26

    Define the float property of the check element to none:

    float: none;
    

    And center the parent element:

    text-align: center;
    

    It was the only that works for me.

提交回复
热议问题