최근글 코멘트 앞에 +를 넣고 싶은데

최근글 코멘트 앞에 +를 넣고 싶은데

QA

최근글 코멘트 앞에 +를 넣고 싶은데

답변 1

본문

최근글에서 코멘트가 있으면 바로 숫자가 나오는데

+ 뒤에 코멘트가 나오게 할려면 아래 소스를 어찌 해야 할까요?

 

최근글 입니다. +1

 

css는 

.cnt_cmt {display:inline-block;margin-left:3px;color:#cb011b;font-size:11px;}

 

 

                if ($list[$i]['comment_cnt'])
                echo $list[$i]['comment_cnt'];

 


                echo "<a href=\"".$list[$i]['href']."\">";
                if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong>";
                else
                echo $list[$i]['subject'];
                if ($list[$i]['comment_cnt'])
                echo $list[$i]['comment_cnt'];
                echo "</a>";

이 질문에 댓글 쓰기 :

답변 1



                echo "<a href=\"".$list[$i]['href']."\">";
                if ($list[$i]['is_notice'])
                echo "<strong>".$list[$i]['subject']."</strong>";
                else
                echo $list[$i]['subject'];
                if ($list[$i]['comment_cnt'])
                echo "+".$list[$i]['comment_cnt'];
                echo "</a>";

답변 주셔서 감사합니다.

혹시

echo "+".$list[$i]['comment_cnt'];

위에 소스데로 하면 +는 검정색으로 뒤에 코멘트는 #cb011b 이 색상으로 나오는데
+ 이것도 빨간색으로 하고 싶은데 어찌 해야 할까요?

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 116
© SIRSOFT
현재 페이지 제일 처음으로