gpt4 book ai didi

css 表格列宽未设置

转载 作者:行者123 更新时间:2023-11-28 11:50:51 25 4
gpt4 key购买 nike

我正在尝试将表格列的宽度设置为最小值。标题行 (th) 设置为 white-space:nowrap 以防止换行。现在所有列(包括 td 行)都设置为 th 的宽度。我试图通过在 html 中将其设置为
来扩展较小列的大小 <th style="width:200px;"> and <td style="width:200px;"> , 但它没有效果。在 firebug 中,在样式部分中,宽度设置处于事件状态

element.style  {
width:200px;
}

仍然,计算出的选项卡显示宽度小于 200px。请参阅下面的详细信息。

th -- 计算:

Text
font-family verdana,arial,helvetica,sans-serif
font-size 10px
font-weight bold
font-style normal
color #333333
text-transform none
text-decoration none
letter-spacing normal
word-spacing 0
line-height 17px
text-align left
vertical-align baseline
direction ltr
Background
background-color transparent
background-image none
background-repeat repeat
background-position 0 0
background-attachment scroll
opacity 1
Box Model
width 152px
height 17px
top auto
right auto
bottom auto
left auto
margin-top 0
margin-right 0
margin-bottom 0
margin-left 0
padding-top 0
padding-right 0
padding-bottom 0
padding-left 0
border-top-width 0
border-right-width 0
border-bottom-width 0
border-left-width 0
border-top-color #333333
border-right-color #333333
border-bottom-color #333333
border-left-color #333333
border-top-style none
border-right-style none
border-bottom-style none
border-left-style none
Layout
position static
display block
visibility visible
z-index auto
overflow-x visible
overflow-y visible
white-space nowrap
clip auto
float none
clear none
-moz-box-sizing content-box
Other
cursor pointer
list-style-image none
list-style-position outside
list-style-type disc
marker-offset auto

和 td --computed:

Text
font-family verdana,arial,helvetica,sans-serif
font-size 11px
font-weight 400
font-style normal
color #222222
text-transform none
text-decoration none
letter-spacing normal
word-spacing 0
line-height 12px
text-align left
vertical-align top
direction ltr
Background
background-color transparent
background-image none
background-repeat repeat
background-position 0 0
background-attachment scroll
opacity 1
Box Model
width 152px
height 48px
top auto
right auto
bottom auto
left auto
margin-top 0
margin-right 0
margin-bottom 0
margin-left 0
padding-top 5px
padding-right 6px
padding-bottom 5px
padding-left 6px
border-top-width 0
border-right-width 1px
border-bottom-width 0
border-left-width 0
border-top-color #222222
border-right-color #222222
border-bottom-color #222222
border-left-color #DDDDDD
border-top-style none
border-right-style none
border-bottom-style none
border-left-style solid
Layout
position static
display table-cell
visibility visible
z-index auto
overflow-x visible
overflow-y visible
white-space normal
clip auto
float none
clear none
-moz-box-sizing content-box
Other
cursor auto
list-style-image none
list-style-position outside
list-style-type disc
marker-offset auto

任何帮助,非常感谢...谢谢

最佳答案

最小宽度:200px

关于css 表格列宽未设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2910072/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com