Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text Box like a underline

Is there any way to make a textbox in asp.net control appear like a underline only, just like in paper documents where blanks are placed for text input?

like image 745
sagar Avatar asked Dec 10 '12 11:12

sagar


People also ask

How do you underline a text box?

The quickest way to underline text is to press Ctrl+U and start typing.

How do I change a text box style?

Select the text box you want to change. On the Format tab, click the More drop-down arrow in the Shape Styles group. A drop-down menu of styles will appear. Select the style you want to use.


1 Answers

Apply a solid border-bottom:

<asp:TextBox id="txt" runat="server" CssClass="underlined" />

CSS:

input.underlined
{
   border:0;
   border-bottom:solid 1px #000;
   outline:none; /* prevents textbox highlight in chrome */
}

-- SEE WORKING DEMO --

like image 117
Curtis Avatar answered Oct 20 '22 02:10

Curtis