Sunday, January 18, 2009

CSS for TextBox

Dev Palmistry

How to make css for TextBox :

To link a document to a CSS text file (say, styles.css), place a link tag in the document’s header:

LINK REL=”STYLESHEET” TYPE=”text/css” HREF=”styles.css”

The href attribute tells the web browser where the style sheet file (style1.css) can be found, in the same way that the href attribute is used in an anchor to point to the destination file (e.g. Home).

The rel="stylesheet" and type="text/css" parts of the link tag tell the browser what kind of file is being linked to, and how the browser should handle the content. You should always include these important attributes when linking to a .css file.





In page.aspx:

asp:textbox id="txbTest" CssClass="textbox"
Runat="server">


In Styles.css:

..textbox
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-style:normal;
height:18px;
}

No comments: