字段集:中心图例 [英] Fieldset: Center legend

查看:160
本文介绍了字段集:中心图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个诀窍在这里完成了,我也买了针对我的专案: http://themeforest.net/item/aloma-liquid -mobile-template / full_screen_preview / 5819068



css中的代码如下所示:

  fieldset {
display:block;
margin:20px 1%;
margin-bottom:20px;
padding:0 auto;
padding:15px 0;
border:0;
border-top:1px solid #DDD;
width:98%;
}

legends {
display:table;
min-width:0px;
max-width:70%;
position:relative;
margin:auto;
padding:5px 20px;
color:#eee8aa;
font-size:20px;
text-align:center;
}

但是当我尝试在我的项目的另一个页面重做它,不使用主题,我失败。上面的代码中缺少什么?

解决方案

主题使用代码< legend align = center> 可修复Firefox问题:



http://jsfiddle.net/ncv8H/

 < legend align =center> legend< / legend> 


as asked many times before (but never really answered) I want to center a legend in a fieldset.

The trick was done perfectly here, which I also bought for my project: http://themeforest.net/item/aloma-liquid-mobile-template/full_screen_preview/5819068

the code from the css reads like this

fieldset {
      display: block;
      margin: 20px 1%;
      margin-bottom: 20px;
      padding: 0 auto;
      padding: 15px 0;
      border: 0;
      border-top: 1px solid #DDD;
      width: 98%;
}

legend {
     display: table; 
     min-width: 0px;
     max-width: 70%;
     position: relative;
     margin: auto;
     padding: 5px 20px;
     color: #eee8aa;
     font-size: 20px;
     text-align: center;
}

But when I try to redo it in another page in my project, that doesn't use the theme, I fail. Am I missing something in the code above?

解决方案

The theme uses the code <legend align="center"> which fixes the Firefox issue:

http://jsfiddle.net/ncv8H/

<legend align="center">legend</legend>

这篇关于字段集:中心图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆