【问题标题】:Table data css for dropdown & adress input用于下拉列表和地址输入的表格数据 css
【发布时间】:2023-03-24 17:27:02
【问题描述】:

我在表格中使用了这个 CSS。 1)背景颜色在地址和下拉列表中消失。 有什么解决办法。 2)我还想要地址和下拉列表来填充整个表格宽度。 我没有得到我应该使用哪个标签。

有人可以帮忙吗?我正在学习它。

table,th,td{
border-spacing:2px;
font-size:15px;
font-family:"Georgia";
border-radius:6px;
padding:3px;
border: 1px solid white; }
td{
color:#FFFFFF;
background-color:#548EA3;
border-spacing:5px; }
td input {/*sof*/
    width: 100%;
    background: transparent;
}

【问题讨论】:

  • 您也可以提供您的 HTML 代码吗?

标签: css html-table css-selectors css-tables


【解决方案1】:

这是因为它们在 textarea & select 中。您只为 td input 设置样式为 textarea 和选择框设置样式

td textarea, td select {
    width: 100%;
    background: transparent;
}

【讨论】:

    【解决方案2】:

    我没有看到你的 CSS 选择。

    td select {  
        background-color:#548EA3;
        width: 100%;
    }
    

    【讨论】:

      【解决方案3】:

      你可以这样做

      td textarea, td select {
          width: 98%;
          background: transparent;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-07-31
        • 1970-01-01
        • 1970-01-01
        • 2013-05-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多