2013-02-12 2 views
0

여러 개의 backround 이미지를 사용하고 있는데 하나의 div를 사용하지만 IE8에서는 작동하지 않습니다. 여기 내 CSS 코드 :이 문제에 대한 해결책이CSS Multibackground

.description-page #main-navigation ul{ 
    text-align:left; 
    width: 451px;background:url(../images/menu-desing.png) no-repeat center 26px , 
          url(../images/top-bar1.png) no-repeat center 0px ; 
    height: 86px; z-index:100;padding-top: 9px; 
} 

인가?

+0

여러 div를 사용할 수 있습니까? –

+0

예 그 possibe.but 내가 여러 배경을 사용할 수있는 해결 방법은 하나의 div? –

+0

그것은 내 대답을 참조하십시오 :) – pwolaq

답변

0

당신이 뭔가를 할 수있는 IE8을 위해 또한 2 개 배경을 달성하기 위해 다음 당신은, 우리가 가진 두 번째를 만들 것입니다 DOM에 하나 개의 요소가 필요합니다 IE8 (IE7 아님)에서 이미 작동하는 의사 요소의 도움.

.description-page #main-navigation ul { 
    text-align:left; 
    width: 451px; 
    background:url(../images/menu-desing.png) no-repeat center 26px; 
    height: 86px; 
    padding-top: 9px; 

    position: relative; 
    z-index: 1; 
} 

/* Generate a new element with the second background, positioned on the same place like the original ul */ 
.description-page #main-navigation ul:before { 
    background: url(../images/top-bar1.png) no-repeat center 0px; 
    content: ""; 
    height: 86px; 
    left: 0; 
    position: absolute; 
    top: 0; 
    width: 451px; 

    z-index: -1; 
}