我正在尝试添加Google自定义搜索,但它仍然显示不正确.按钮上的搜索图标丢失,看起来好像文本框的底部被切断了.
新成员,所以我无法发布图像.
码
<div id="header"> <div class="row"> <div class="four columns"> <h1><img src="images/QEFlogo.JPG" /></h1> </div> <div class="four offset-by-two columns"> <div id="iso" class="hide-for-small"> <h1> <img src="images/ISO9001.jpg" /> <img src="images/ISO14001.jpg" /> </h1> </div> <div id="gcsearch" class="hide-for-small"> <gcse:searchBox-only></gcse:searchBox-only> </div> </div> </div> </div>
没有真正的CSS可以说……
#gcsearch { width:300px; position:relative; left:-5px; }
编辑现在发现这是问题所在. Google元素在其服务器上使用CSS文件default.css.这会生成宽度和高度.
在CSS表的第126行,它定义了……
.cse .gsc-search-button input.gsc-search-button-v2,input.gsc-search-button-v2 { height: 13px; margin-top: 2px; min-width: 13px; padding: 6px 27px; width: 13px; }
请记住,我没有太多的Javascript知识,为什么会发生这种情况,我该如何解决?