IE7 does not respect z-index

前端 未结 2 1129
名媛妹妹
名媛妹妹 2020-12-15 23:27

Running in compatibility mode the calendar below renders behind the textboxes below. IE8 displays the calendar how I need it to.

My CSS

.MyCalendar          


        
相关标签:
2条回答
  • 2020-12-16 00:00

    I finally got it on top with an additional transparent background image. IE8. SASS:

      #galerie-link {
        position: absolute;
        z-index: 1000;
        top: 25px;
        left: 40px;
        a {
          display: block;
          width: 185px;
          height: 90px;
          background-image: url(../images/transparent.png);
        }
      }
    
    0 讨论(0)
  • 2020-12-16 00:25

    IE has problems with z-index. Most browsers treat the page as one continuous stacking context, but in IE, positioned elements generate a new stacking context, starting with a z-index value of 0.

    As mentioned in this article:

    http://trwa.ca/2012/03/ie-z-index-bug-and-how-to-squash-it/

    try giving the calendar's parent element an even higher z-index.

    0 讨论(0)
提交回复
热议问题