테스트 사이트 - 개발 중인 베타 버전입니다

해결이 안되서 다시 질문드려요. 필드 폰트 색상변경.ㅜㅜ 채택완료

offonoff 2년 전 조회 2,020

                                <div class="list-spec">
                                    <table>
                                        <?php
                                        foreach ($bo_fieldm as $k => $v) {
                                            if ($v['lv'] != '1') continue;
                                        ?>
                                            <tr>
                                                <th><?php echo get_text($v['name']) ?></th>
                                                <td><?php echo get_text($list[$i][$k]); ?></td>
                                            </tr>
                                        <?php } ?>
                                    </table>
                                </div>

-----------------------------------------

이게 list.skin.php 이고,

 

스타일 시트는 

.list-spec { width:100%; padding:0px; }
.list-spec table {border-collapse: collapse; width:100%; border-top:2px solid #000}
.list-spec td, .list-spec th {padding:1.2em 1em; border-top:1px solid #ccc; border-bottom:1px solid #ccc;}
.list-spec td { font-size:15px; }
.list-spec th { background-color:#eee; padding:0.4em 1em; font-size:14px; text-align:right; width:35%}
 

이렇게 들어가 있습니다. 

여기서 필드 5번째만 폰트색상을 레드로 주고 싶다면 어떤 코드를 삽입해야 하나요?

저번에 질문했을때 주신 답변들로는 해결이 안되네요.ㅜㅜ

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 3개

채택된 답변
+20 포인트
2년 전
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

o
offonoff
2년 전
해결됐습니다!! 정말 감사합니다 :)

댓글을 작성하려면 로그인이 필요합니다.

        .list-spec td:nth-child(5),
        .list-spec th:nth-child(5) { color: red; }

 

추가해 보실래요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

F
2년 전

.list-spec table tr:nth-of-type(5) th, .list-spec table tr:nth-of-type(5) td{color:red;}

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

o
offonoff
2년 전
이방법도 되네요. 감사합니다^^

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인