Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8306561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:21:25+00:00 2026-06-08T18:21:25+00:00

Using Twitter’s Bootstrap, I have a form with an input field and a prepended

  • 0

Using Twitter’s Bootstrap, I have a form with an input field and a prepended icon:

<div class="input-prepend">
  <label for="some_name">What's your ...</label>
  <span class="add-on"><i class="icon-road"></i></span>
  <input type="text" class="span2" name="some[name]" id="some_name"/>
</div>

And this is the result:

enter image description here

I haven’t changed Bootstrap’s CSS as of yet. The examples show no such space between icon and input field. How do I get rid of it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:21:26+00:00Added an answer on June 8, 2026 at 6:21 pm

    Found it out myself: Don’t break lines between icon markup and input:

    <div class="input-prepend">
      <label for="some_name">What's your ...</label>
      <span class="add-on"><i class="icon-road"></i></span><input type="text" class="span2" name="some[name]" id="some_name"/>
    </div>
    

    As Twitter themselves explain it in the icons documentation:

    When using beside strings of text, as in buttons or nav links, be sure to leave a space after the tag for proper spacing.

    That was my clue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Twitter Bootstrap's bootstrap-tab.js, I have: <ul class=tabnavcenter id=myTab> <li class=active><a href=#home data-toggle=tab>about</a></li> <li><a
I'm using twitter bootstrap . I have a div with 25 px padding. I
Using twitter-bootstrap, how do I decorate my input tag with an icon? I've tried:
I am using twitter bootstrap and I have a form with link that should
I am using twitter bootstrap and I would like a container div to stretch
I have been using twitter bootstrap to build a small blog site for myself
I have problem getting the dropdown menu to work using Twitter's Bootstrap. Here's my
I'm using Twitter Bootstrap, and have a Google map. Images on the map, such
I am using Twitter Bootstrap and at one place I have nested fluid-grid in
I am using twitter bootstrap but have a problem with the nav bar height

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.