wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

How to use the input group in the boostrap? #7

Closed wonderfan closed 9 years ago

wonderfan commented 9 years ago

Input groups are extended Form Controls. Using input groups you can easily prepend and append text or buttons to text-based inputs.

By adding prepended and appended content to an input field, you can add common elements to the user’s input. For example, you can add the dollar symbol, the @ for a Twitter username, or anything else that might be common for your application interface.

To prepend or append elements to a .form-control:

Wrap it in a

with class .input-group

As a next step, within that same

, place your extra content inside a with class .input-group-addon.

Now place this either before or after the element.

For cross browser compatibility, avoid using