zoukankan      html  css  js  c++  java
  • 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;

  • 相关阅读:
    K
    士兵队列训练问题
    分析A + B Problem II
    C++中sort()的用法
    swing初级应用创建一个窗体
    java生成随机数
    JAVA数字格式化
    CodeForces
    POJ
    51Nod
  • 原文地址:https://www.cnblogs.com/miharu/p/4500568.html
Copyright © 2011-2022 走看看