我正在使用 Telerik MVC 库中的日期选择器。它在标准模式下的 Firefox 和 IE8+ 中显示并运行良好。
在 Quirks 或 IE7 标准模式下的 IE6、IE7 和 IE8 中,input
字段为显示,但不显示日历图标。
我想我已经将其范围缩小到渲染包含图标的跨度的问题。此跨度的 HTML 为:
<span class="t-icon t-icon-calendar" title="Open the calendar">Open the calendar</span>
应用于 span
的 CSS 为:
>问题似乎是 span
正在以 0px 的宽度和高度呈现,无论 CSS 中指定了什么。为什么会发生这种情况?我可以采取什么措施来解决这个问题?
我尝试将 font-size
和 line-height
设置为 12px
,但没有帮助。
答案更新
事实证明,跨度上的样式根本不是问题。我对输入元素(float:left)进行了一些样式设置,这导致包含图像的跨度最终位于输入后面。
I'm using the Date Picker from the Telerik MVC library. It appears and works fine in Firefox and IE8+ in standards mode.
In IE6, IE7, and IE8 in Quirks or IE7 Standards modes the input
field is displayed, but not the calendar icon.
I think I've narrowed it down to a problem rendering the span that contains the icon. The HTML for this span is:
<span class="t-icon t-icon-calendar" title="Open the calendar">Open the calendar</span>
and the CSS applied to the span
is:
The problem seems to be that the span
is being rendered with width and height of 0px, regardless of what's specified in the CSS. Why is this happening, and what can I do to fix it?
I've tried setting font-size
and line-height
to 12px
, but it didn't help.
Answer Update
It turns out that the styling on the span wasn't the problem at all. I had some styling on the input element (float: left) which caused the span containing the image to end up behind the input.
发布评论
评论(2)
这是 链接到针对同一问题打开的论坛主题。我相信这些问题已经有了答案。
Here is a link to the forum thread opened on the same matter. I believe the questions is already answered.
事实证明,跨度上的样式根本不是问题。我对输入元素(float:left)进行了一些样式设置,这导致包含图像的跨度最终位于输入后面。
我也将其添加为问题的更新。
It turns out that the styling on the span wasn't the problem at all. I had some styling on the input element (float: left) which caused the span containing the image to end up behind the input.
I've added this as an update to the question also.