简体   繁体   中英

Search field is showing out of layout inside my asp.net mvc web application

I have the following inside my razor view:-

<div style="float:right">
@using (Ajax.BeginForm(
new AjaxOptions
{
    HttpMethod = "get",
    InsertionMode = InsertionMode.Replace,
    LoadingElementId = "progress",
    UpdateTargetId = "customerTable"
}))
{
<text>Search</text>  <input placeholder="Search by name.." name="searchTerm" type="text" data-autocomplete-source= "@Url.Action("AutoComplete", "Customer")" /> 
<input class="btn btn-success" type="submit" value="search" />
<img src="~/Content/Ajax-loader-bar.gif" class="loadingimage" id="progress" />
}
</div>  
<div id="customerTable">
@Html.Partial("_CustomerTable", Model)
</div>

The layout will show well on IE and chrome,, but it will be out of layout on firefox as shown below:-

在此处输入图片说明

So what might be causing this layout fault?

That isn't so much a "layout" fault as much as it's probably a CSS fault. I'm going to guess that you're not floating the "Customer List" area, or it is too wide thus causing the div containing your form to be bumped down because there isn't room.

Try making your "Customer List" title not as wide and/or floating it left and see what happens.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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