<asp:Label ... CssClass="Label14pt" ... />
// In CSS file
..Label14pt
{
font-size: 14pt;
/* other properties... */
}
You should be able to use code to add the CssClass attribute to any control
using its Attribute property. Check the documentation to determine if the
Label control actually supports the Attribute property which common sense
suggests it must as your own code shows the use of attributes. If you were
using ASP.NET 2.0 you could use a skin to do the same thing and the CSS
would be generated at run-time.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL
http://clintongallagher.metromilwaukee.com/
"david" <da***@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Further more, if the label is nested in panel, how to write it. For
example,
<asp:panel id="pl">
<asp:Label id="lb" ....> Words
</asp:Label>
</asp:panel>
"david" wrote:
I never use CSS for asp.net. I would like to get help about how to write
CSS
for the font size of asp label control. I have a lot of labels in asp.net
web
form design page. It seems that there is no attribute in property pane to
setup text font with pt.
For example, I have the following in the HTML in MS Visual Studio
<asp:label id="Label1" style="Z-INDEX: 101; LEFT: 24px; POSITION:
absolute;
TOP: 24px" runat="server" Font-Bold="True" FontSize="Small">State
Examination
</asp:label>
So I have to manually change Small to 14pt.
Any body could be kind to give me a CSS script to do this kind job?
Thanks
David