Setting Background Image inside a Textbox using CSS.

vishalneeraj-24503
Posted by vishalneeraj-24503 under CSS 3 category on | Points: 40 | Views : 482
input[type='text']
{
background-image:url('Images/search.gif');
background-repeat:no-repeat;
padding-left:20px;
}
<asp:TextBox ID="txt1" runat="server"></asp:TextBox>
<asp:TextBox ID="txt2" runat="server"></asp:TextBox>
<asp:TextBox ID="txt3" runat="server"></asp:TextBox>
<asp:TextBox ID="txt4" runat="server"></asp:TextBox>
<input type="text" />


For a particular text box
.searchBox_1
{
background-image:url('Images/search.gif');
background-repeat:no-repeat;
padding-left:20px;
}
<asp:TextBox ID="txt" runat="server" CssClass="searchBox_1"></asp:TextBox>

Comments or Responses

Login to post response