简体   繁体   English

引导程序的响应式设计无法正常工作

[英]responsive design with bootstrap not working properly

I am trying to append a Search button to an input search field which is not working properly. 我正在尝试将“搜索”按钮附加到无法正常工作的输入搜索字段。

I am not able to trace the error as I am new to bootstrap. 我是Bootstrap的新手,所以我无法跟踪该错误。

I have set up an example on jsFiddle 我在jsFiddle上建立了一个例子

I am trying to make it work in an asp.net webform based website 我正在尝试使其在基于asp.net Webform的网站中工作

Below is the code snippet 下面是代码片段

        <div id="search-wrapper" class="span3 offset5">
            <div  class="span3 input-append">
                <asp:TextBox ID="txtSearch"  placeholder="Search" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearch" CssClass="btn" runat="server" Text="Go!" />
            </div>
        </div> 

Go Button doesn't append properly with the input field. Go按钮”未正确附加在输入字段中。 as shown in this example 如本所示

I have made some minor changes to css to make it work with max-width:1000px. 我对css进行了一些小的更改,以使其与max-width:1000px一起工作。

Rest is almost same. 休息几乎是一样的。 I even tried to use botstrap css directly from CDN but it doesnt make different to the button 我什至尝试直接从CDN使用botstrap css,但这与按钮没有什么不同

UPDATE: 更新:

I tried changing .btn css 我尝试更改.btn CSS

.btn {
  display: inline-block;
  *border-left: 0 none #e6e6e6;
    border-right: 0 none #e6e6e6;
    border-top: 0 none #e6e6e6;
    border-bottom: 0 none #b3b3b3;
    display: inline;
    padding: 4px 12px; 

This line to padding: 6px 12px;. 这行要填充:6px 12px;。 This minutely fixed it in FF but other browser it make problem worse. 这将它固定在FF中,但其他浏览器使问题更糟。

Works here, a bit of a bad design: http://jsfiddle.net/azF8w/54/ 在这里工作,有点不好的设计: http : //jsfiddle.net/azF8w/54/

<div class="input-prepend">
    <span class="add-on"><button>Go</button></span>
  <input class="span2" id="prependedInput" type="text" placeholder="Username">
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM