Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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
Html Internet Explorer 8不正确地显示搜索表单_Html_Css_Forms_Internet Explorer 8 - Fatal编程技术网

Html Internet Explorer 8不正确地显示搜索表单

Html Internet Explorer 8不正确地显示搜索表单,html,css,forms,internet-explorer-8,Html,Css,Forms,Internet Explorer 8,使用IE 8时,我的搜索表单显示不正确。输入字段太低。在Firefox、Chrome和Safari中,一切正常 这是我的HTML: <form class="search" role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> <input type="text" placeholder="Suchen..." name="s" id="s" /&g

使用IE 8时,我的搜索表单显示不正确。输入字段太低。在Firefox、Chrome和Safari中,一切正常

这是我的HTML:

<form class="search" role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" placeholder="Suchen..." name="s" id="s" />
<input type="submit" id="searchsubmit" value="Start" />
</form>
}

}

}

}

}

}

}

}


可能是填充有问题?

试试这个css,我已经从输入中删除了填充:0

.search { 
background: #F3F4F3; 
padding: 10px; 
width: auto; 
color: #666; 
font-size: 11px; 
line-height: 1.3em; 
padding-top: 10px; 
margin-bottom: 20px; 
margin-top: 0px; 

 }
input { 
color:#fff; 
border:1px solid #B3B5B3; 
background:transparent; 
outline:none; 
height:21px;  
margin: 0; 
padding: 0px 8px; 
font-family: $std-sans-font; 

 }
input[type="text"] { 
color: #515b57; 

 }
:-moz-placeholder { 
color:#515b57; 

 }
::-webkit-input-placeholder { 
color:#515b57; 

 }
input:focus { 
font-style: normal; 
@include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px); 

 }
form { 
display:inline-block; 

 }
input[type="submit"] { 
background:#B3B5B3; 
height:23px; 
border:0; 
&:hover, &:focus { 
    @include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px); 
} 

您只是缺少了
float属性
,因此请使用下面的命令编辑您的css

input[type="text"] {
   color: #515b57;
   margin-right: 2px;
   float: left;
}

input[type="submit"] {
background:#B3B5B3;
height:23px;
float: left;
&:hover, &:focus {
    @include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px);
}​

input::-moz-focus-inner
{
    border: 0;
    padding: 0;
}
它应该会起作用。请参阅jsfiddle上的。
input::-moz focus inner
在input中更正
文本对齐

input
下,您已经定义了两次
填充。
input[type="text"] {
color: #515b57;
:-moz-placeholder {
color:#515b57;
::-webkit-input-placeholder {
color:#515b57;
input:focus {
font-style: normal;
@include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px);
form {
display:inline-block;
input[type="submit"] {
background:#B3B5B3;
height:23px;
border:0;
&:hover, &:focus {
    @include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px);
}
.search { 
background: #F3F4F3; 
padding: 10px; 
width: auto; 
color: #666; 
font-size: 11px; 
line-height: 1.3em; 
padding-top: 10px; 
margin-bottom: 20px; 
margin-top: 0px; 

 }
input { 
color:#fff; 
border:1px solid #B3B5B3; 
background:transparent; 
outline:none; 
height:21px;  
margin: 0; 
padding: 0px 8px; 
font-family: $std-sans-font; 

 }
input[type="text"] { 
color: #515b57; 

 }
:-moz-placeholder { 
color:#515b57; 

 }
::-webkit-input-placeholder { 
color:#515b57; 

 }
input:focus { 
font-style: normal; 
@include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px); 

 }
form { 
display:inline-block; 

 }
input[type="submit"] { 
background:#B3B5B3; 
height:23px; 
border:0; 
&:hover, &:focus { 
    @include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px); 
} 
input[type="text"] {
   color: #515b57;
   margin-right: 2px;
   float: left;
}

input[type="submit"] {
background:#B3B5B3;
height:23px;
float: left;
&:hover, &:focus {
    @include single-box-shadow(rgba(255,255,255,0.5), 0px, 0px, 6px);
}​

input::-moz-focus-inner
{
    border: 0;
    padding: 0;
}