I want to add style in ASP.NET textbox control. I couldn't find textbox element in elements list. I can put style in all input controls using the below code in CSS.
input
{
backgroud-color:black;
}
But this changes the background color of all input controls like buttons, radiobox, etc.
I want to do it exclusively with textbox, I don't want to do it with CSS class.
It would be easier to put css class on those textboxes (input type="text")
<style>
.textbox { /*some style here */ }
</style>
<input type="text" class="textbox" /> or
<asp:TextBox id="someid" runat="server" CssClass="textbox" />
This will do it:
input[type=text]
Though it might not work in all browsers (e.g. IE). The only way to ensure that would be to add a class or put it inside a span element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With