02.06.2015 Views

Bootstrap Tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER<br />

17<br />

<strong>Bootstrap</strong> Input Groups<br />

This chapter explains about one more feature <strong>Bootstrap</strong> supports, the Input Groups. Input groups are<br />

extended Form Controls. Using input groups you can easily prepend and append text or buttons to text-based<br />

inputs.<br />

By adding prepended and appended content to an input field, you can add common elements to the user’s input.<br />

For example, you can add the dollar symbol, the @ for a Twitter username, or anything else that might be common<br />

for your application interface.<br />

To prepend or append elements to a .form-control:<br />

<br />

<br />

<br />

Wrap it in a with class .input-group<br />

As a next step, within that same , place your extra content inside a with class.input-groupaddon.<br />

Now place this either before or after the element.<br />

For cross browser compatibility, avoid using elements here as they cannot be fully styled in WebKit<br />

browsers. Also do not apply input group classes directly to form groups. An input group is an isolated component.<br />

Basic Input Group<br />

Following examples demonstrates basic input group:<br />

<br />

<br />

<br />

@<br />

<br />

<br />

<br />

<br />

<br />

.00<br />

<br />

<br />

<br />

$<br />

<br />

.00<br />

TUTORIALS POINT<br />

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!