css - Span 在 IE7 中不显示

标签 css internet-explorer-7

我有以下标记:

<div id="calender">
<span class="moduleItemDateCreated-month">Jan</span>
<span class="moduleItemDateCreated-day">24</span>
</div>

使用此 CSS 样式:

#calender {
    float: right;
    border: 1px solid #999999;
    color:#FFFFFF;
    background-color: #CCCCCC;
}

.moduleItemDateCreated-month {
    background-color: #999999;
    display: block;
    font-size: 10px;
    line-height: 1.5em;
    text-align: center;
    width: 56px;
}

.moduleItemDateCreated-day {
    background-color: #CCCCCC;
    display: block;
    font-size: 23px;
    text-align: center;
    padding-top: 6px;
    padding-bottom: 6px;
    width:56px;
}

在 IE7 中,第二个跨度不可见,有人知道为什么吗?

Here is a temporary link

here's a screenshot

最佳答案

您可能在 IE 中遇到了 Float 错误。由于您知道包装器 div 的高度和宽度,因此您可以在 CSS 中指定它。

如果您正在寻找更多解决方案,IE float 中有很多帮助,但前面:https://www.google.com/search?q=ie7+float+right+bug

关于css - Span 在 IE7 中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9986855/

相关文章:

html - <p> 中的文本在 IE/MS Edge 中部分隐藏在 Bootstrap 中

javascript - 在 IE7|8 中用特殊替换模式替换字符串的奇怪行为

javascript - 如何在按回车键使用 contenteditable 时多次提交表单

html - 为什么打印的时候图片在div外面?

CSS - 调整窗口大小后背景丢失

html - 带有嵌套 UL 和 CSS 过滤器的 IE7 错误

css - GWT-suggestbox 样式

javascript - css3 动画链接工作奇怪

css - Internet Explorer 7 中的页脚显示问题

css - Bootstrap + Font Awesome + IE7 = 带图标的按钮上没有标题