尽管我在网上找到了一些例子,但它并没有解决我的问题。希望可以有人帮帮我。 我有两个css文件。一个是重置所有样式属性。有代码(片段)声明CSS中的类内幕类
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, menu, nav, section, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
由于规则,我无法修改reset.css。我只在style.css上工作。我做了什么来使HeaderStyle有效。我创建了一个新的类,它的工作原理。
tr.dgrdHeaderfntsize13e td
{
font-size: 1.4em; /* 1.3em 11px */
font-weight: bold;
background-color: #F2F7FA;
padding: 5px;
text-transform: none;
vertical-align: middle;
text-align: left;
}
我的问题是如何为单元格上的字体大小创建类。我试过td.fntsize13e
和tr td.fntsize13e
不起作用。还有就是我的.aspx页面中
<asp:DataGrid ID="dgrdLawyers" Runat="server" DataKeyField="GlobalID" GridLines="Both"
AutoGenerateColumns="false" CssClass="dgrdInnerBorders noOuterBorder talgnC"
CellPadding="5" >
<PagerStyle Mode="NumericPages" Position="Top" HorizontalAlign="Right" />
<%--<HeaderStyle CssClass="dgrdHeader talgnL fntsize13e"></HeaderStyle>--%>
<HeaderStyle CssClass="dgrdHeaderfntsize13e"></HeaderStyle>
<ItemStyle CssClass="dgrdItem talgnL fntsize13e"></ItemStyle>
你可以显示*呈现* HTML,而不是ASP源? – 2013-02-27 20:37:23
你能显示你的文档的< head >吗? – 2013-02-27 20:39:49
愚蠢的问题,但是'fntsize13e'宣布在任何地方? – GordonsBeard 2013-02-27 20:40:29