1、问题描述:

在使用ASP.NET Ajax的日历控件时,可能会出现控件的部分被其它DIV容器遮住的情况,从理论上讲是设置DIV的z-index属性就可以,

但是关键是怎么设置日历控件的z-index,使其处于最顶层。

2、解决办法:

通过查找日历控件的源代码,可以找到名为Calendar.css的样式表,样式表的第一行表示整个日历控件这个容器的样式,代码如下:

.ajax__calendar_container {

  padding:4px;position:absolute;

  cursor:default;

  width:170px;

  font-size:11px;

  text-align:center;

  font-family:tahoma,verdana,helvetica;

}

我们只要在页面重写这行样式规则就可以实现效果。

.MyCalendar .ajax__calendar_container

{

  z-index:1000;

}

然后在控件中设置CssClass="MyCalendar",这样就可以啦。。

出处:http://blog.csdn.net/atian15/archive/2009/06/01/4231090.aspx

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2021-08-18
  • 2021-12-02
  • 2022-12-23
猜你喜欢
  • 2021-08-22
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-11-08
相关资源
相似解决方案