Sunday 6 April 2014

how to create CSS file in asp.net with example.

Cascading Style Sheets (CSS)

A theme can also include a cascading style sheet (.css file). When you put a .css file in the theme folder, the style sheet is applied automatically as part of the theme. You define a style sheet using the file name extension .css in the theme folder.
Definition and Usage
The CssClass property is used to set or return a CSS style class to a control.
Syntax
<asp:webcontrol id="id" CssClass="style" runat="server" />

Attribute
Description
style
A String specifying the CSS class used on the control
Example:

 Create CSS file :--Solution Explorer--> Add new item--> Styel sheet using css extension (mycss.css)

CSS File coding:-

Default.aspx File coding
Output:


0 comments:

Post a Comment