2012-03-15 2 views
2

내가 크롬과 파이어 폭스에서 잘 작동하지만 IE에서 나는 두 개의 클래스 CSS를강제 레이블 배경 : 홈페이지() Internet Explorer에서

내 라벨의 배경을 표시 할 수없는 HTML/CSS 코드를 하나는 활성 lable 용이고 다른 하나는 비활성 용입니다.

여기 내 CSS 코드입니다 :

.jqTransformDayRadioWrapper label { 
    width: 31px !important; 
    height: 28px; 
    margin-right: 2px; 
    text-align: center; 
    font-weight: normal; 
    line-height: 28px; 
    cursor: pointer; 
    background: url('../img/form/day_radio_button.gif') no-repeat; 
} 
.jqTransformDayRadioWrapper label.active { 
    background: url('../img/form/day_radio_button_selected.gif') no-repeat !important; 
} 

그리고 여기 CakePHP의 HTML을 도우미 형태로 HTML 코드를 생성 할 수 있습니다 : 사전에

<div class="jqTransformDayRadioWrapper"> 
    <label for="EventReoccurringOnDay1">S</label> 
    <input name="data[Event][reoccurring_on_day1]" type="text" class="jqTransformDayRadioWrapper" value="0" id="EventReoccurringOnDay1" /> 

    <label for="EventReoccurringOnDay5">T</label> 
    <input name="data[Event][reoccurring_on_day5]" type="text" checked="checked" class="jqTransformDayRadioWrapper" value="1" id="EventReoccurringOnDay5" /> 
    </div> 
</div> 

감사합니다 :).

답변

0

레이블이 인라인 요소이므로 레이블을 display:block;으로 설정해야합니다. 그리고 디스플레이없이 : 블록; 배경 이미지가 IE 7에 나타나지 않습니다.

+0

답장을 보내 주셔서 감사합니다. display : block을 추가해 주셔서 감사합니다. 하지만 여전히 같은 문제가 있습니다. – user1271775

관련 문제