html - 将样式应用于放置在另一个表中的特定子表

标签 html css asp.net wizard

我需要给放在另一个表第三行的表应用样式,

<html>

  <head>
    <title>HTML Table</title>
  </head>

  <body>
    <table class="wizard-ux">
      <tbody>
        <tr>
          <table>
            <tr>
              <td>test Table 2</td>
              <td>test Table 2</td>
            </tr>
          </table>
        </tr>
        <tr>
          <table>
            <tr>
              <td>test Table 2</td>
              <td>test Table 2</td>
            </tr>
          </table>
        </tr>
        <tr>
          <td>
            <table>
              <tr>
                <td>Save (Width has to be 90%)</td>
                <td>Cancel (Width has to be 10%)</td>
              </tr>
            </table>
          </td>
        </tr>
</tbody>
    </table>
  </body>

</html>

因为这是 asp.net 向导,所以我没有子表的 ID 或类,唯一的引用是父表的“wizard-ux”。我需要通过 CSS 将第一列的宽度设置为 90%,将第二列的宽度设置为 10%,

有人可以为此推荐一个 CSS,

提前致谢,

最佳答案

试试下面的 CSS

.wizard-ux tr:last-of-type table td:first-of-type
{
    width:90%;

}
.wizard-ux tr:last-of-type table td:last-of-type 
{
    width:10%;

}

关于html - 将样式应用于放置在另一个表中的特定子表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52387773/

相关文章:

html - 在 Bootstrap 旋转木马上的 Img

PHP-如何在php中用css制作一个漂亮的日历

html - 图片链接导致另一个图片链接无法点击

javascript - 像媒体屏幕一样工作的 jquery 代码

asp.net - machine.config 和 web.config 中的 machineKey 属性。它们是合并的还是被覆盖的?

c# - 在创建模式 MVC 4 中填充 DropDownList 中的数据

javascript - 将数据从文本区域传递到单选按钮的值

javascript - 单击父 div 时切换复选框

html - div 大小不等于顶部和底部

asp.net - ListView 创建的无序列表在悬停时不显示