@using ASPNetSpell;
@{
ASPNetSpell.Razor.SpellAsYouType MyAsYouType = new ASPNetSpell.Razor.SpellAsYouType();
MyAsYouType.InstallationPath = ("/Content/ASPNetSpellInclude");
MyAsYouType.FieldsToSpellCheck = "Search_Data";
}
<div id="searchbar">
@using (Html.BeginForm("Search", "Home", new { @class = "search-box" }))
{
@Html.AntiForgeryToken()
@Html.TextBox("Search_Data", ViewBag.FilterValue as string, new { @class = "search-box" })
<input type="image" src="~/Images/Search.gif" alt="Find Everything Catholic" style="display:inline" />
@*@Html.Raw(MyAsYouType.getHtml())*@
}
</div>
以上代码显示文本框旁边的图像。如果我取消注释MyAsYouType行,则图像会下降一行。
该行正在添加一个element.style of display:block。如果我在chrome元素检查器中删除它,它会正确显示。
我找不到覆盖此设置的位置。
谢谢, 道格
答案 0 :(得分:0)
这是你的.cshtml:
<div id="searchbar">
@using (Html.BeginForm("Search", "Home", new { @class = "search-box" }))
{
@Html.AntiForgeryToken()
@Html.TextBox("Search_Data", ViewBag.FilterValue as string, new { @class = "search-box" })
<input type="image" src="~/Images/Search.gif" alt="Find Everything Catholic" style="display:inline" />
@*@Html.Raw(MyAsYouType.getHtml())*@
}
</div>
这是你添加的CSS:
.spellAsYouType { display: inline-block!important; }
这应该可以解决你的问题。