가능한 중복 :
Is there a CSS parent selector?상위의 CSS를 선언 할 수 있습니까?
이 코드가 있습니다
<div class="main_parent">
<a href="www.google.it">
<img src="/path/image.jpg" alt="image" />
</a>
</div>
을 나는 이미지가 포함 링크에 속성 text-decoration:none;
을 설정하고 싶습니다.
그래서, 같은 일도 :
.main_parent img < a
{
text-decoration:none;
}
하지만 물론 그것은 작품을 나던. CSS 2로 어떻게 할 수 있습니까?