Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

input-append class button shows with a margin

Hi StackOverflow community, i'm building a site based on twitter bootstrap 2.0.4 in certain page i want to attach a button to an input. the problem is that show with a margin between the input and the button.

i'm sure that is something i'm missing, but i can't determine what it is ?

EDIT: Some styles like disabled and uneditable-input are not applying correctly in the page

EDIT 2: Apparently working .disabled and .uneditable-input.

JFiddle: http://jsfiddle.net/sHGtb/

JFiddle Fullscreen result: http://jsfiddle.net/sHGtb/embedded/result/

any help ??

HTML

<!DOCTYPE html>
<html>
<head>
    <title>Page Title</title>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="http://localhost/test/index.php/../css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="http://localhost/test/index.php/../css/bootstrap-responsive.min.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
        <script src="../../js/html5shiv.js"></script>
    <![endif]-->
    <script type="text/javascript" src="http://localhost/test/index.php/../js/modernizr.js"></script>
</head>
<body>
    <div class="container">
        <form class="form-horizontal">
            <fieldset>
                <hr/>
                <h4>Puesto</h4>
                <p>Debe estar asignado segun su perfil, solo los administradores pueden cambiar esta opcion; si existiese alguna irregularidad debe solicitar reportelo al administardor.</p>
                <div class="control-group">
                    <label for="puesto" class="control-label">Puesto</label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" name="puesto" class="input-xlarge" />
                            <button class="btn" type="button"><i class="icon-search"></i></button>
                        </div>
                    </div>
                </div>
                <hr/>

            </fieldset>
        </form>
    </div>  
    <script language="javascript" type="text/javascript" src="http://localhost/test/index.php/../js/jquery-1.7.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="http://localhost/test/index.php/../js/bootstrap.min.js"></script>
</body>
</html>

Screenshot of the problem

like image 807
Rafael Avatar asked Jul 06 '12 18:07

Rafael


1 Answers

This might sound very dumb but don't leave a new line between the input and the button your text editor is messing with the page :-P

      <div class="control-group">
                <label for="puesto" class="control-label">Puesto</label>
                <div class="controls">
                    <div class="input-append">
                        <input type="text" name="puesto" class="input-xlarge" /><button class="btn" type="button"><i class="icon-search"></i></button>
                    </div>
                </div>
            </div> 
like image 199
Jesus Avatar answered Nov 26 '22 02:11

Jesus