Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将CSS应用于特定asp.net表?_Css_Asp.net_Css Tables - Fatal编程技术网

如何将CSS应用于特定asp.net表?

如何将CSS应用于特定asp.net表?,css,asp.net,css-tables,Css,Asp.net,Css Tables,我从一个网站上下载了一个.css样式表,其中包括许多表格样式。我想将.css样式表应用于特定的asp.net表。所以在aspx中我有 <asp:Table cssClass="downloadedCss"> </asp:Table> 如何使所有这些css属性仅适用于表(下载的css类)ASP.NET表将呈现为HTML表 您的示例将呈现为: <table class="downloadedCss"> </table

我从一个网站上下载了一个.css样式表,其中包括许多表格样式。我想将.css样式表应用于特定的asp.net表。所以在aspx中我有

          <asp:Table cssClass="downloadedCss">
          </asp:Table>

如何使所有这些css属性仅适用于表(下载的css类)

ASP.NET表将呈现为HTML表

您的示例将呈现为:

<table class="downloadedCss">
</table>
如果你改变

table {}

然后将其添加到所有其他样式之前,则仅将这些样式应用于该表。e、 g

table.downloadedCss caption {}
table.downloadedCss td, th {}
然而,我可能会去掉很多css,因为我怀疑您是否需要所有这些。


<table CssClass="pnlstudentDetails">
        <tr>
            <td>
            </td>
        </tr>
    </table>

To apply Css for all the td elements under the specific table or panel or div try this code .
 .pnlstudentDetails td
        {
            height: 40px;
            vertical-align: middle;
            text-align: left;
            margin-top: 10px;
        }
要将Css应用于特定表、面板或div下的所有td元素,请尝试以下代码。 .pnlstudentDetails td { 高度:40px; 垂直对齐:中间对齐; 文本对齐:左对齐; 边缘顶部:10px; }
table.downloadedCss {}
table.downloadedCss caption {}
table.downloadedCss td, th {}
<table CssClass="pnlstudentDetails">
        <tr>
            <td>
            </td>
        </tr>
    </table>

To apply Css for all the td elements under the specific table or panel or div try this code .
 .pnlstudentDetails td
        {
            height: 40px;
            vertical-align: middle;
            text-align: left;
            margin-top: 10px;
        }