我只是在使用 WordPress CMS 的网站上工作。
在 IE、Firefox、Opera 和其他浏览器上工作正常,但在 Chrome 上不行。
在 Firefox 中的站点http://dian.7u.cz上,搜索表单处于良好位置,但在 Chrome 上,它位于真实位置下方。
我像这样生成那个按钮
<div id="topsearch">
<?php get_search_form(); ?>
</div>
火狐把它变成这样
<div id="topsearch">
<div id="search">
<form id="searchform" action="http://localhost/wordpress/" method="get">
<input id="s" type="text" onfocus="if (this.value == 'Hľadať') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Hľadať';}" name="s" value="Hľadať">
</input>
<input type="image" style="border:0; vertical-align: top;"src="http://localhost/wordpress/wp-content/themes/GamesMax/GamesMax/images/search.gif">
</input>
</form>
</div>
</div>
但是 Chrome 是这样的
<div id="topsearch">
""
<div id="search">
<form id="searchform" action="http://localhost/wordpress/" method="get">
<input id="s" type="text" onfocus="if (this.value == 'Hľadať') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Hľadať';}" name="s" value="Hľadať">
</input>
<input type="image" style="border:0; vertical-align: top;"src="http://localhost/wordpress/wp-content/themes/GamesMax/GamesMax/images/search.gif">
</input>
</form>
</div>
</div>
我用于 topsearch 的 CSS 是:
#topsearch {
text-align:left;
float:right;
margin-bottom: 0;
margin-right: 17px;
margin-top: 9px;
}
有人可以帮我吗?