Monday, 18 November 2013

Background color of textbox on focus

1. Open Visual Studio
2. Create a New Website
3. Add web page
4. from WEbsite - >Add New Item -> StyleSheet- > Click Add.
5. Write code in the css file



.txt
{

}
.txt:focus
{
    background-color:Red;
}

6. Add css to the web page's head section.

<link rel="stylesheet" type="text/css" href="Styles/Site.css" />

7. Add TextBox to a web page.

  <asp:TextBox ID="txt1" runat="server" CssClass="txt" ></asp:TextBox>

8. Click F5



1 comment:

Thanks

SQL server tricky questions