Class="form-control" What does that do?

Hi all. I’m not clear what the form control class is, or what it does. Does anyone have the ability to clarify that for me?

It’s a class defined by Bootstrap.

All textual <input>, <textarea>, and <select> elements with .form-control are set to width: 100%; by default.
https://getbootstrap.com/css/#forms-example

2 Likes

So essentially what it’s doing is lengthening the text-input area to cover the width of the screen that it’s viewed on, or atleast the window that the form is in. Is that right?

Not just the width of the screen it’s in, but the width of the container it’s in. Aside from setting it’s width, .form-control also tweaks the <input>'s appearance (including the borders, padding, colors, etc.).

7 Likes

I certainly appreciate your help.