Textbox Border

This page demonstrates how to create a textbox border around your HTML textboxes.

Textboxes are input fields created by the <textarea> element. You can use the CSS border property to add a border around your HTML textboxes. You can also use border-width, border-style, and border-color, but the border property covers all of these anyway.

Here are some examples of textbox borders.

Solid Textbox Border

Source CodeResult

Dashed Textbox Border

Source CodeResult

Dotted Textbox Border

Source CodeResult

Double Textbox Border

Source CodeResult

Outset Textbox Border

Source CodeResult

Inset Textbox Border

Source CodeResult

Grooved Textbox Border

Source CodeResult

Ridged Textbox Border

Source CodeResult

Various Textbox Borders

You can also specify different styles/colors/widths for each side of your textbox. You can also specify that the border should only be placed on one/two/three sides of the text box.

Source CodeResult

Textbox Border on 1 Side Only

You can also specify that the border should only be placed on one side of the text box. Example:

Source CodeResult

Textbox Border on 1 Side Only

You can also use the above technique to place a border on two or three sides of the text box. Example:

Source CodeResult