输入字段在小提琴中工作正常,但在浏览器中没有

时间:2013-10-29 05:04:08

标签: javascript jquery html css twitter-bootstrap

我有一个有三个输入字段的表单。它在jsfiddle中工作正常但是如果我在任何浏览器中运行那么输入文本字段的一部分就会出来。但是如果我减小浏览器大小那么工作正常。当我使用引导程序时,所有字段必须在所有屏幕大小上都相同,无论是手机还是标签或计算机。请告诉我如何使其在所有屏幕尺寸中正常运行。

这是显示来自div 的移动文字字段的屏幕截图 enter image description here 这是截图,显示了小尺寸文本字段的正常功能 enter image description here

这是输入字段的代码

<div class="tab-pane" id="tab2"> 
<form class="well span9" action="insertNew" method="post"> 

<table border="1" id="mytable"/>
<tr>
<th>Add</th>
<th>Username</th>
<th>EmailId</th>
<th>Mobile No</th>
</tr>
</table>

<div class="row"> 
<div class="span3"> 
<label>Name</label> 
<input type="text" id="fields" class="span4" placeholder="Your full Name" name="username" required> 

</div> 
<div class="span3"> 

<label>Email Address</label> 
<input type="email" id="fields1" class="span4" placeholder="Your email address" name="email" required> 
</div> 
<div class="span3"> 
<label>Mobile</label> 
<input type="tel" id="fields2" class="span4" placeholder="+756762462182" name="mobile" maxLength="13" required > 
</div> 
</div> 
<input type="button" id="btn1" class="btn btn-lg btn-primary" value="Add">
</form> 
<div class="well span9">    <input type="button" id="btn2" class="btn btn-lg btn-primary" value="Group">
</div>

</div> 

1 个答案:

答案 0 :(得分:1)

尝试这样的事情,FIDDLE

    <form class="form-horizontal">
        <div class="control-group">
            <label class="control-label" >Name</label>
            <div class="controls">
                <input type="text" id="fields" class="span4" placeholder="Your full Name" name="username" required />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" >Email Address</label>
            <div class="controls">
                <input type="email" id="fields1" class="span4" placeholder="Your email address" name="email" required />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" >Mobile</label>
            <div class="controls">
                <input type="tel" id="fields2" class="span4" placeholder="+756762462182" name="mobile" maxLength="13" required />
            </div>
        </div>
        <div class="control-group">
            <input type="button" id="btn1" class="btn btn-lg btn-primary" value="Add">
            <input type="button" id="btn2" class="btn btn-lg btn-primary" value="Group">
        </div>
    </form>