CSS In .NET

  • Thread starter Thread starter Zile
  • Start date Start date
Z

Zile

How to add css in asp.net 2.0 aplication. On label control I have some
property named CssClass, but if I add some class name, it doesn't work. How
to add css class for label control?

Thanx
 
Hi,
How to add css in asp.net 2.0 aplication. On label control I have some
property named CssClass, but if I add some class name, it doesn't work. How
to add css class for label control?

Thanx

Where is the CSS class defined? Setting the CssClass attribute only
copies the value to the HTML file. You must include the CSS file
yourself in the ASPX page's header (or add the <style> section).

HTH,
Laurent
 
You have to also reference the CSS file. T do in a single page, drag the css
file onto the page and it will create the link. For the master page, change
the href in the created link to include a tilde (~) for root:

<link href="~/css/common.css" rel="stylesheet" type="text/css" />


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
 
Back
Top