【问题标题】:ui-select with big text crushing my table带有大文本的 ui-select 压碎了我的桌子
【发布时间】:2016-09-16 18:04:21
【问题描述】:

In my <table> I have ui-select field, and when selected text is big <td> became too wide and that crush all my table.我尝试将max-width 添加到 ui-select 或 ui-select-match 但它不起作用。

ui-select {
  max-width: 10%;
}

ui-select-match {
  max-width: 10%;
}

我该如何解决这个问题? (Plnkr example)

【问题讨论】:

    标签: css angularjs ui-select


    【解决方案1】:

    在最终的 html 输出中,ui-select 和 ui-select-match 将作为类生成。所以使用下面的代码来获得期望的输出。

    .ui-select {
      width: 100px;
    }
    
    .ui-select-match {
      width: 100px;
    }
    

    这里是Plunker code。

    【讨论】:

      【解决方案2】:

      将打击代码提供给 CSS 样式。这对我有用。

      table { 
      table-layout:fixed; width:400px;
      

      }

      【讨论】:

        猜你喜欢
        • 2017-02-08
        • 2018-09-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-15
        • 1970-01-01
        • 2015-04-30
        相关资源
        最近更新 更多