开发者

IE displaying fieldset legend incorrectly

开发者 https://www.devze.com 2023-03-25 08:10 出处:网络
The code I am using is appearing fine in FF but in IE, it resorts to the legend appearing almost in the fieldset with no space for the legend after the fieldset. I have included pic so you can see exa

The code I am using is appearing fine in FF but in IE, it resorts to the legend appearing almost in the fieldset with no space for the legend after the fieldset. I have included pic so you can see exact problem. I would be grateful if someone could show me where I am going wrong as I have spent 2 days trying to sort this. Thanks

Complete code layout: http://jsfiddle.net/XLPxx/

legend {
          background:#00C621; color:#fff; 
          font:17px/21px Calibri, Arial, Helvetica, sans-serif; 
          padding:0 10px; margin:-26px 0 -5px -11px; 
          font-weight:bold; border:1px solid #fff; 
          border-color:#e5e5c3 #505014 #666661 #e5e5c3; cursor: pointer;
       }

fieldset.action {
          background:#9da2a6; 
          border-color:#e5e5e5 #797c80 #797c80 #e5e5e5; 
          margin-top:-20px;
       }

fieldset {
          background:#f2f2e6; 
          padding: 0 开发者_运维问答10px 10px 10px; 
          border:1px solid #fff; 
          border-color:#666661 #fff #666661 #fff; 
          margin-bottom:20px; width:450px;
        }

IE displaying fieldset legend incorrectly


You need to add a larger bottom margin to your fieldset and make it display:block. Live example: http://jsfiddle.net/XLPxx/7/

fieldset{
    display:block;
    margin: 0 0 30px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消