473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How write CSS for font_size for the asp.net label control

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
May 2 '06 #1
3 8900
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

May 2 '06 #2
It may be called StyleSheet. How to write it about font-size?

Thanks

David

"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

May 2 '06 #3
<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

May 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mike Casey | last post by:
Hello all, I have ASP.NET label controls tied to a datasource (so text will vary in length depending on the record). In IE everything looks great--text is wrapped if needed. In Netscape and...
1
by: Dave | last post by:
This is pretty basic but here goes: Is there a shortcut for typing text for a label? Every example I've seen requires you to go to the property window, select the name property value and then...
3
by: Jason Dean | last post by:
Hello, I have a simple asp:label control that I want to write some complicated HTML to. Currently I have this code and it works fine: myLable.Text = "<p>this is my text</p>" Bust as my...
3
by: PK9 | last post by:
I'm having some issues with using a Response.Write or the shortcut ( <%= ...) from within a label control. I cannot do this in the code behind, I need to do it here at runtime. I have a public...
8
by: Ankit Aneja | last post by:
I'm trying to use a for() loop to go through a set of labels and set their visibility to false. I had to do something like Code: for(int i=1;i<=10;i++) { labeli.visible = false;
6
by: jcrouse | last post by:
I am rotating some text is some label controls. In the one place I use it it works fine. In the other place I use it I can't figure out the syntax. I don't really understand the event. Where it...
8
by: david | last post by:
I have developed a web form by using visual Studio. My question is: (1) what is the problem? (2) what is right way to do it? In the form, there are labels with id: lblWear, lblColor, and...
8
by: Arpan | last post by:
Consider the following code snippet (my main intention is to display the current time in a Label control as & when this ASPX page is accessed/refreshed): <script runat="server"> Class Clock...
6
by: Eng Teng | last post by:
How do I write a code to activate a popup menu when I right click in a label control? Regards, Tee
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.