Html 在搜索框旁边显示搜索按钮(图像)
试图使搜索按钮(图像)显示在搜索框旁边或内部。无论我尝试什么,搜索按钮(图像)总是在搜索框下方,出于某种原因居中Html 在搜索框旁边显示搜索按钮(图像),html,search,webpage,html-formatting,Html,Search,Webpage,Html Formatting,试图使搜索按钮(图像)显示在搜索框旁边或内部。无论我尝试什么,搜索按钮(图像)总是在搜索框下方,出于某种原因居中 <form id="navigationSearchForm" action="http://products.divalsafety.com/storefrontCommerce/search.do" method="get" name="searchForm" accept-charset="UTF-8"> <input id="searchIn
<form id="navigationSearchForm" action="http://products.divalsafety.com/storefrontCommerce/search.do" method="get" name="searchForm" accept-charset="UTF-8">
<input id="searchInputBox" type="text" name="keyword" size="25" maxlength="75" value="">
<span id="keywordspan" style="display: none; visibility: hidden;"><label>keyword</label>
<input id="keywordInput" type="text" name="searchType" value="keyword" size="12" maxlength="10">
</span>
<span id="emailspan" style="display: none; visibility: hidden;"><label>E-mail</label>
<input id="emailAddressInput" type="text" name="emailAddress" size="12" maxlength="20">
</span>
<input id="searchGoButton" style="width: 27px;" type="image" src="/images/searchbutton27px.png" alt="Search">
</form
关键词
电子邮件
尝试单独定义css,而不是在HTML中内联。尽管如此,我还是采用了您的代码,并在搜索图像中添加了一个位置样式。这应该行得通
试试这个:
<form id="navigationSearchForm" action="http://products.divalsafety.com/storefrontCommerce/search.do" method="get" name="searchForm" accept-charset="UTF-8">
<input id="searchInputBox" type="text" name="keyword" size="25" maxlength="75" value=""></input>
<span id="keywordspan" style="display: none; visibility: hidden;"><label>keyword</label>
<input id="keywordInput" type="text" name="searchType" value="keyword" size="12" maxlength="10"></input>
</span>
<span id="emailspan" style="display: none; visibility: hidden;"><label>E-mail</label>
<input id="emailAddressInput" type="text" name="emailAddress" size="12" maxlength="20"></input>
</span>
<input id="searchGoButton" style="width: 27px; position:relative; left:-40px; top:10px;" type="image" src="/images/searchbutton27px.png" alt="Search"></input>
</form>
关键词
电子邮件
您可以创建吗?-出于某种原因,它显示在fiddle的右侧,但在我的Joomla网站上,它总是位于搜索框的中心和下方。最终,我希望在搜索框中找到它。可能还有其他一些css会影响您的元素。试着检查
的父项,可能是它有固定的宽度,导致跨度下降。好主意!还有其他一些CSS影响它。我删除了那个代码,现在一切都好了。谢谢欢迎,很高兴帮助您:)一旦删除了影响代码中某些标识符的CSS代码,这也适用于我。谢谢你的回复和帮助!