0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-12 00:08:59 +01:00
Bootstrap/site/content/docs/4.3/forms/form-control.md
XhmikosR 9c75a63bfc
Update form-control.md (#29203)
Fix Readonly plain text form alignment
2019-08-04 20:20:00 +03:00

2.6 KiB

layout title description group toc
docs Form controls Give textual form controls like `<input>`s and `<textarea>`s an upgrade with custom styles, sizing, focus states, and more. forms true

Example

{{< example >}}

{{< /example >}}

Sizing

Set heights using classes like .form-control-lg and .form-control-sm.

{{< example >}} {{< /example >}}

Readonly

Add the readonly boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.

{{< example >}} {{< /example >}}

Readonly plain text

If you want to have <input readonly> elements in your form styled as plain text, use the .form-control-plaintext class to remove the default form field styling and preserve the correct margin and padding.

{{< example >}}

{{< /example >}}

{{< example >}}

Confirm identity {{< /example >}}