473,406 Members | 2,369 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,406 software developers and data experts.

Div Style and ASP Controls

If I create a <divand specify that I want the font-size to be 1.2em for
instance, why do the <asp:controls not follow this rule if they are
contained within the <divstatement?

How/what do I need to do to get them to follow this rule? Am I forced to
place a CssClass on each control?

Thanks in advance for your assistance
Apr 2 '07 #1
1 3449
How are you specifying the font size? Are you using CSS?

If so, you can create a CSS rule that indicates that all child elements or
all descendant elements or all child elements of a specific type, or all
descendant elements of a specific type should inherit the style. The syntax
is:

Descendant:
Descendants are references separated by a space:

div p (all paragraph descendants of a div)
#id * (all descendants of an element with the id of "id")
div * p (all paragraph descendants of any element that is
a descendant of a div - not immediate children)
..class div p (all paragraph elements that are inside a div that is inside an
element of class "class")

Child (immediate descendant):
Children are references separated by a '>' character:

div p (any paragraph that is an immediate child of a div)
#foo div p (any paragraph that is an immediate child of a div which
is an immediate child of an element with the ID "foo"

See http://www.w3.org/TR/REC-CSS2/selector.html for more details.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JimHeavey" <Ji*******@discussions.microsoft.comwrote in message
news:DF**********************************@microsof t.com...
If I create a <divand specify that I want the font-size to be 1.2em for
instance, why do the <asp:controls not follow this rule if they are
contained within the <divstatement?

How/what do I need to do to get them to follow this rule? Am I forced to
place a CssClass on each control?

Thanks in advance for your assistance

Apr 2 '07 #2

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

Similar topics

4
by: Paul Aspinall | last post by:
I am designing a Winforms app, using the NetAdvantage (Infragistics) controls - which are very good. How can I make multiple different contents in my content pane?? ie. In Outlook, there is a...
1
by: Kevin | last post by:
My app was built with VC++ and run on WinXP, I found the controls style of my app is different from controls in those apps coming with WinXP, like button, check box, listctrl, etc, those controls...
2
by: Herb Stull | last post by:
I'm trying to give users a choice of the visual interface used in my ASP.NET application using Cascading Style Sheets. Ideally I'd like to offer them several choices for backgrounds, fonts, etc....
5
by: JezB | last post by:
Is it possible to programatically examine and modify a page's Styles (including Cascading Style Sheets) within the code-behind-module (eg. c#) ? My guess is that since these are HTML elements the...
7
by: Don Wash | last post by:
Hi There! I'm creating several ASCX Controls and those controls will have their own CSS Style Sheets. But I don't know how I can link the corresponding Style Sheet in the ASCX file? Because the...
7
by: Rob Nicholson | last post by:
We're using a well known presentation layer library to implement complex controls on an intranet site. IE has the following limitation which effectively means that you can only have 30 <STYLE> tags...
9
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
3
by: Dave Hughes | last post by:
Hi, I've run across a problem styling form controls (quel surprise), or rather in this case, "unstyling" them. I'm trying to put together a theme for a web application which has a fairly...
4
Frinavale
by: Frinavale | last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs). When I looked at the AjaxToolkit control to see how they got...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.