473,503 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use of CSS for controls (label, textbox, etc.)

I'm experimenting with StyleSheets in ASP.NET.

If I put a label on my webform and <LINK> the CSS file with the following
entries to the webform it doesn't work. It only works if I fill the property
'cssClass' of the label with the value 'label'.

..label
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

Isn't there some standard way of connecting classes (or whatever) to the
standard ASP.NET controls without having to fill the 'cssClass' property of
each and every control on the page ? Like using .label for labels or
..textbox for textbox controls ?
Kind regards,
Jurjen de Groot
Netherlands.
Nov 18 '05 #1
3 7053
that's because asp:Labels are read as INPUT by the css
try

INPUT
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
I'm experimenting with StyleSheets in ASP.NET.

If I put a label on my webform and <LINK> the CSS file with the following
entries to the webform it doesn't work. It only works if I fill the property 'cssClass' of the label with the value 'label'.

.label
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

Isn't there some standard way of connecting classes (or whatever) to the
standard ASP.NET controls without having to fill the 'cssClass' property of each and every control on the page ? Like using .label for labels or
.textbox for textbox controls ?
Kind regards,
Jurjen de Groot
Netherlands.

Nov 18 '05 #2
Curt,

Thanks for pointing me in the right direction, for labels one should use
'span' and for textbox you use 'INPUT'

Jurjen.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:u3**************@TK2MSFTNGP11.phx.gbl...
that's because asp:Labels are read as INPUT by the css
try

INPUT
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
I'm experimenting with StyleSheets in ASP.NET.

If I put a label on my webform and <LINK> the CSS file with the following entries to the webform it doesn't work. It only works if I fill the property
'cssClass' of the label with the value 'label'.

.label
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

Isn't there some standard way of connecting classes (or whatever) to the
standard ASP.NET controls without having to fill the 'cssClass'

property of
each and every control on the page ? Like using .label for labels or
.textbox for textbox controls ?
Kind regards,
Jurjen de Groot
Netherlands.


Nov 18 '05 #3
My bad... you are correct...
Basically what I was shooting for is that you need to use the RENDERED html
tag type, not the asp type. :}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Curt,

Thanks for pointing me in the right direction, for labels one should use
'span' and for textbox you use 'INPUT'

Jurjen.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:u3**************@TK2MSFTNGP11.phx.gbl...
that's because asp:Labels are read as INPUT by the css
try

INPUT
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
I'm experimenting with StyleSheets in ASP.NET.

If I put a label on my webform and <LINK> the CSS file with the following entries to the webform it doesn't work. It only works if I fill the

property
'cssClass' of the label with the value 'label'.

.label
{
background-color: Red;
font-family: Verdana;
font-size: xx-large;
}

Isn't there some standard way of connecting classes (or whatever) to the standard ASP.NET controls without having to fill the 'cssClass'

property
of
each and every control on the page ? Like using .label for labels or
.textbox for textbox controls ?
Kind regards,
Jurjen de Groot
Netherlands.



Nov 18 '05 #4

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

Similar topics

7
3491
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
9
17598
by: wASP | last post by:
Hello again to all of you geniuses, I'm having a problem trying to load dynamic controls at the initialization phase. I've read the docs, and I thought I had it figured out:...
8
4297
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
4
1960
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
4
2077
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
7
2454
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
15
2150
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
0
2385
by: Mike Collins | last post by:
I someone can please help, I am about at an end in trying to figure this out. I am adding some dynamic controls to my page (I found out that I was supposed to be doing that in the oninit event,...
0
2658
by: rn5a | last post by:
Suppose I have the following DataGrid: <asp:DataGrid ID="dgUsers" OnUpdateCommand="UpdateDG" runat="server"> <Columns> <TemplateColumn HeaderText="NAME"> <ItemTemplate> <asp:Label...
0
2851
by: chandrasekhar | last post by:
Hi I have developed a web page with some controls. I put all of them in session variables. I passed this values in the page. When an user enter some data in form fields and click the buttton ,...
0
7202
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
7084
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
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
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...
1
6991
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...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.