html - 为什么 "Legend"在 ie8 中没有样式化?

标签 html css twitter-bootstrap internet-explorer-8

<form class="form" id="profile_form">
   <legend>Your profile</legend>
     <div class="control-group ">
         <label class="control-label">Phone</label>
         <div class="controls">
         <input type="text" id="phone" class="span5">
         <div class="help-block phone_not_confirmed need_confirm">
          To confirm your phone number, please check for a text message from us.
         </div>
         <label class="checkbox">
         <input type="checkbox" id="phone_visible">
           Display my phone number to the public
         </label>
       </div>
     </div>

.... ....

在 IE8 中,文本“您的个人资料”出现,但没有样式。注意:我使用的是 Bootstrap。

最佳答案

IE 中有一个奇怪的行为。 IE7 和 IE8 关闭它遇到的不在 fieldset 元素内的图例元素,并将其内容移出到相邻​​的文本节点。

因此,解决方法是将图例包装在字段集中。

来源:http://html5doctor.com/legend-not-such-a-legend-anymore/

关于html - 为什么 "Legend"在 ie8 中没有样式化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16229436/

相关文章:

Jquery 从索引中获取表单元素 ID

javascript - Twitter Bootstrap 的响应式背景?

css - 我的网络字体仅适用于 chrome

javascript - HTML/CSS/JS : Max-Height being misrecognized and not applied on transitions

javascript - 带有堆叠列的 Bootstrap 网格

html - FontAwesome 4.3.0 图标无法在我的网站上正确显示

php - 不在 mysql , php 中更新

html - 修复了运行 CSS3 的打印标题

html - 流体布局纯 CSS

html - CSS 过滤器在 Firefox 中不起作用