Applying a CSS style to controls TextBox and Button
Applying a css style to controls <asp:TextBox .../> and <asp:Button .../>
Code:
<style type="text/css">
.text-search {
height: 38px;
font-family: "Helvetica Neue",helvetica,sans-serif;
font-weight: normal;
color: rgb(0, 143, 213);
font-size: 16px;
padding: 0px 24px;
border-radius: 4px;
background-color: rgb(255, 255, 255);
box-shadow: 0px 1px 2px rgb(81, 184, 228) inset;
border: 1px solid rgb(22, 71, 88);
}
.button-search {
cursor: pointer;
height: 38px;
font-family: "Helvetica Neue",helvetica,sans-serif;
font-weight: bold;
color: white;
font-size: 16px;
padding: 0px 24px;
border-radius: 4px;
background-color: rgb(0, 143, 213);
box-shadow: 0px 1px 2px rgb(81, 184, 228) inset;
text-shadow: 0px 1px 1px rgb(1, 72, 117);
border: 1px solid rgb(22, 71, 88);
}
/* More code ... */
</style>
Code:
<div>
<asp:TextBox ID="TextBoxSearch" runat="server" Text="" CssClass="text-search" Width="200" />
<asp:Button ID="ButtonSearch" runat="server" Text="Search" CssClass="button-search" />
</div>
Here is the result for the sample: