【问题标题】:TD element's width doesn't apply to the gridTD 元素的宽度不适用于网格
【发布时间】:2012-09-26 05:51:22
【问题描述】:
<div id="example" class="k-content">


<table id="grid" style="float: left; position: relative">
    <thead>
        <tr>
            <th width ="310px"data-field="FileName">File Name
            </th>
            <th  width ="290px"data-field="ID">File Identifier
            </th>

        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr >
                <td  class="idRank" >
                    @item.FileName
                </td>
                <td  class="idRank2"  >
                    @item.ID
                </td>

            </tr>
        }
    </tbody>

我使用外部 css

table#grid.k-focusable td.idRank
         { width:310px;
          }

但它不适用并且不能扩大 310 像素,知道吗? 还有什么其他 css 方法可以让我得到应用

【问题讨论】:

    标签: html css razor


    【解决方案1】:

    因为您在 (290px) 处为您的第一列和另一列提供相同的 width (310px); 你必须根据你应得的桌子宽度给它们

    【讨论】:

    • 好吧,我希望 有不同的宽度,而 的宽度根据 你知道
    【解决方案2】:

    不需要.k-focusabletable#grid.k-focusable td.idRank { width:310px;}

    由于没有设置.k-focusable 宽度。

    不如试试

    table#grid .idRank
    { width:310px;}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-23
      • 2011-10-10
      • 2011-03-19
      相关资源
      最近更新 更多