asp.nettextboxasp.net-customcontrol

Change look of TextBox control


Is there a way I can change the appearance of a TextBox from its default look to look like this

enter image description here

I searched for creating a custom TextBox but didnt see anything about changing how it looked.

I have the have the image in a PSD i just didnt know if there was a way to replace the default look with this image

I am new to making websites and just using this for learning purposes so I dont really know where to start


Solution

  • You should use CSS to achieve this. What you need to do is to style it. Here are some nice examples that could help you.

    Here is the one that shows how to add background image:

    .tb11 {
        background:#FFFFFF url(images/search.png) no-repeat 4px 4px;
        padding:4px 4px 4px 22px;
        border:1px solid #CCCCCC;
        width:230px;
        height:18px;
    }