Computed column width is different than css declared width for column. How does browser decide width?

后端 未结 4 613
暖寄归人
暖寄归人 2021-01-17 11:29

Let\'s say I have an html table with a css declared width of 750px. It has 5 columns and each column has a width of 50px, declared using css (all td\'s have a 50px width). O

4条回答
  •  清歌不尽
    2021-01-17 12:20

    This is called the box-model. padding and borders are added to the elements width. So a DIV element with padding: 10px; width: 50px; border: 1px solid black; is actually 72 pixels in width. I expect your td's have a border or padding?

提交回复
热议问题