Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 图像按钮显示";提交;在镀铬的图像上方_Wordpress_Button_Submit - Fatal编程技术网

Wordpress 图像按钮显示";提交;在镀铬的图像上方

Wordpress 图像按钮显示";提交;在镀铬的图像上方,wordpress,button,submit,Wordpress,Button,Submit,我有一个类似的问题,但它发生在Chrome中 值设置为“”,因此Firefox问题的修复程序已在运行中。这只发生在Chrome中,而不是Firefox中。我通过Wordpress搜索表单主题的代码如下: <form method="get" class="searchBox" action="<?php bloginfo('url'); ?>"> <div id="search-form-wrap"> <input type="text"

我有一个类似的问题,但它发生在Chrome中

值设置为“”,因此Firefox问题的修复程序已在运行中。这只发生在Chrome中,而不是Firefox中。我通过Wordpress搜索表单主题的代码如下:

<form method="get" class="searchBox" action="<?php bloginfo('url'); ?>">

<div id="search-form-wrap">



    <input type="text" id="searchBox" name="s" value="" accesskey="4" />

    <input type="image" name="submit" id="searchsubmit" class="nothidden" value="" />



    <?php if ( get_option('k2livesearch') ): ?>



    <?php endif; ?>

<span id="searchreset" title="<?php esc_attr_e('Reset Search', 'k2_domain'); ?>"></span>

        <span id="searchload"></span>

在CSS中添加以下内容:

.nothidden {
text-indent: -9999px;
}

这将隐藏文本,如果有的话。

很抱歉迟到了,但是一个好的答案可能会对所有想要提交图像的人有所帮助

我想说,为什么不尝试使用一个真正的提交类型和一些CSS,比如我下面的示例,也许它没有按照您要求的方式解决问题,但我相信这是解决您的问题的最佳方式,它将是W3C有效的,它将在所有浏览器中工作没有更好的方式来处理图像,所以我恳请您尝试我提供的代码,我希望你会喜欢我做这件事的方式

您的提交行是:

<input type="image" name="submit" id="searchsubmit" class="nothidden" value="" />
如果你使用上面的代码,它将在所有浏览器中工作,如果你不能让它工作,请张贴你的css和表单代码,我会编辑我的答案,以满足你的需要

快乐编码

~z~威廉

<input class="nothidden" type="submit" name="submit" id="searchsubmit" value="Your value" /><!--// Add the style below and edit if needed to your style.css file to create what you want! //-->
    input.nothidden {
border-style: none; /** This is needed to remove borders! **/
display: block;
font-size: 11px; /** Define your font size **/
font-weight: bold; /** Define your font weight **/
height: 23px !important; /** Height of your image **/
/** padding: 4px 0 0; - add some padding if needed... **/
text-align: center; /** Where do you want the text? left, right or center?**/
text-decoration: none; /** Don't want a underline or other decorations? **/
width: 91px; /** Width of your image **/
background: url(http://www.hollandiateam.eu/plaatjes/purple_small.gif) no-repeat scroll 0 0 transparent; /** This is what you want! a image to submit your form and don't  use any javascript, W3C validation and no problems in firefox, Chrome and Internet Explorer! **/
border: none;  /** This is needed to remove image border! **/
color: #080808; /** This is the text color change it to your favorite color **/
} /** The css lines below if you want a hover image sprite or an other hover image, colors etc! **/
   /** use the css below if you would like to have hover changes! **/
input.nothidden:hover {
background-position: 0 -23px; /** example if you're using a sprite image, else use background: url(http://www.hollandiateam.eu/plaatjes/purple_small.gif) no-repeat scroll 0 0 transparent; with the path to your image, if you want to use hover and don't use sprites, you will need to add all css lines used by the input.nothidden class and change image url for hover... **/
color: #0000ff; /** hover text color **/
}