[英]Design issues when combining .panel with FIELDSET and .panel-heading with LEGEND
For accessibility reasons I need to add fieldset
and legend
to Bootstrap's .panel
element. 对于辅助功能的原因,我需要添加
fieldset
和legend
来引导的.panel
元素。 But sadly, the legend
can't be styled correctly anymore: the border around fieldset
only comes to the middle height! 但是可悲的是,无法正确设置
legend
样式: fieldset
周围的边框仅达到中间高度!
Codepen: http://codepen.io/jmuheim/pen/ByMVwY Codepen: http ://codepen.io/jmuheim/pen/ByMVwY
Anyone knows how to make the fieldset.panel-heading
look exactly the same as the div.panel-heading
? 有谁知道如何使
fieldset.panel-heading
与div.panel-heading
完全相同?
You can add float left to the legend
tag. 您可以将浮点数添加到
legend
标签。 Since the width is already set to 100%, it should not cause any issues 由于宽度已经设置为100%,因此不会引起任何问题
http://codepen.io/anon/pen/LEqrBR http://codepen.io/anon/pen/LEqrBR
legend.panel-heading {
font-size: 14px;
margin-bottom: 0;
float: left;
}
I checked this on FF and Chrome on a Mac, seems fine. 我在FF和Mac上的Chrome上进行了检查,似乎还不错。 To get the spacing right for the body part, you could add a margin to the
legend
tag. 要获得正确的身体部位间距,您可以在
legend
标签中添加边距。 For example 例如
margin-bottom: 10px;
http://codepen.io/anon/pen/dPaKgv http://codepen.io/anon/pen/dPaKgv
I attempted something similar yesterday. 昨天我尝试过类似的事情。 This post will probably have what you need.
这篇文章可能会满足您的需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.