Using CSS class selectors in server controls


show more Using CSS class selectors in server controls provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Using CSS class selectors in server controls

Website developers who are accustomed to using Cascading Style Sheets to affect the appearance of their HTML elements might be used to using ID selectors. An ID selector is a Cascading Style Sheet selector that applies its properties to only one element of the page matched by the ID. For example, in the current version of the header control the panel with an ID of menuPanel, which is wrapped around the anchor tags that make up the menu, is identified by the phrase menuPanel. I have used the Cascading Style Sheet class of the same name but they aren't related to each other.

If I wanted to modify this panel and I wanted to apply it using an ID selector, I would go back to styles.css and instead of putting a period, I would put in the pound sign. Now I'm taking about the menuPanel ID, rather than the menuPanel class. There is a problem with this approach in ASP.NET that you must know about. When you had cleared an ASP.NET server control such as asp:panel and you place it within a cu...

Using CSS class selectors in server controls
Video duration: 4m 9s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Using CSS class selectors in server controls provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...