자식 선택자에 대해서 궁금한게 있는데요 ㅎ
딥핑크
2023.04.01
table cellspacing=0 cellpadding=0 class=tb
tr
th
table
tr
td123456/td
/tr
/table
/th
td325/td
/tr
/table
이런식의 중첩 테이블을 쓸때 스타일에서자식선택자를 어떻게 써야 하는지를 잘 모르겠어요 ㅠㅠ
style
.tb{border:0px;}
.tb tr th{background-color:#fc0; width:200px; height:50px; font-size:20px;}
.tb tr td{background-color:#000; width:200px; height:50px;}
/style
안에 있는 테이블에는 css를 안먹이고 싶은데
.tb tr td{background-color:#000; width:200px; height:50px;}
이렇게 쓰면 감싸고 있는 테이블에도 css가 안먹고
.tb tr td{background-color:#000; width:200px; height:50px;}
이렇게 쓰면 안에있는 테이블에도 css가 먹네요 어떻게 해야할지 모르겠어요 ㅠㅠ