IE8兼容性问题

buyue__ 2014-12-15 02:20:21
<style>
* {
padding: 0px;
margin: 0px;
}
#search-2013 {
float: left;
width: 330px;
padding: 4px 86px 0px 0px;
}
#search-2013 .i-search {
z-index: 11;
width: 304px;
height: 30px;
margin-bottom: 3px;
border: 3px solid #E4393C;
}
.ld {
position: relative;
}
#search-2013 .form {
height: 30px;
overflow: hidden;
width:100%;
}
.form input {
float: left;
}
#search-2013 input {
margin: 0px;
padding: 0px;
height: 30px;
border: 0px none;
}
#search-2013 .text {
width: 216px;
height: 30px;
padding: 5px;
background-position: 0px -360px;
background-color: #FFF;
background-repeat: repeat-x;
line-height: 20px;
color: #999;
font-family: arial;
font-size: 14px;
}
#search-2013 .button {
width: 88px;
background: none repeat scroll 0% 0% #E4393C;
font-size: 14px;
font-weight: 700;
color: #FFF;
/*float: right;*/
display: inline-block;
}

</style>


<div id="search-2013">
<div class="i-search ld">
<!-- <ul id="shelper" class="hide"></ul> -->
<div class="form">
<input class="text" type="text">
<input value="搜索" class="button" type="button">
</div>
</div>

</div>

上面的代码在火狐,谷歌浏览器上都可以,但在ie8上,第二个input会超过宽度
...全文
162 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
daswcszxw 2014-12-23
  • 打赏
  • 举报
回复
你用这么多padding可以完全还原设计图吗? .ld width:100% .form input border: 0px none; 这些有什么意义?
shengxin16 2014-12-23
  • 打赏
  • 举报
回复
设置了padding导致的
滴滴月空雨 2014-12-15
  • 打赏
  • 举报
回复
显示是正常的,,,,

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧