CSS: IE中的BUG之margin-bottom失效

<div class="inp" id="userdiv"> 
   <label for="UserID" class="inp_lab" id="LabelUserID" onfocus="nameFocus();"> 帐 号 </label> 
   <input name="loginusername" type="text" id="txtUsername" onfocus="nameFocus();" /> 
  </div> 
  <div class="inp"> 
   <label for="UserPassword" class="inp_lab" id="LabelUserPassword"> 密码 </label> 
   <input name="loginpassword" type="password" id="txtPassword" /> 
  </div>

css

.inp { margin:0 25px 13px;height:38px;  position:relative; background:url(../image/loginbg.jpg) repeat-x;}
.inp label { color:#999; font-size:12px; line-height:38px;  padding:0 5px; cursor:text;}
.inp input  { border:1px solid #b9cbdd;width:300px; height:38px; line-height:38px; background:none; padding:0; position:absolute; left:0px; top:0px; font-size:14px; color:#333;}
.inp a { position:absolute; right:0px; top:0px; height:38px; line-height:38px; width:95px; display:inline-block; background:#fff; border-left:1px solid #d5dbe2; color:#999; text-indent:12px; font-size:14px;}
.inp input#txtPassword { font-family:Arial; font-size:20px; line-height:34px;}

inp的margin-bottom 25px;有时会失效

 

解决:.inp margin改为padding

   .inp input  left:0px;改为left:25px;

转载于:https://www.cnblogs.com/miharu/p/4500568.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值