메뉴 클릭시 색상 넣기가 잘 안되네요 ㅠㅠ 정보
메뉴 클릭시 색상 넣기가 잘 안되네요 ㅠㅠ첨부파일
본문
안녕하세요 ^^
정말 좋은 예로 ... 바로 옆에 SIR 우측메뉴바를 보시면,
질문답변 클릭하시면 게시판 이동되면서 질문답변에 글씨색상이 분홍색으로 바뀌잖아요~
이것을 표현하고 싶은데요.. 모든 검색을 다 해서 해봤는데도 안되서 질문까지 올립니다. ㅠㅠ
우선 제가 쓰는 좌측 메뉴바 소스는 첨부로 걸었습니다~
파일 9 번째 줄에
<style>
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
</style>
이렇게 해놓았고,
138 번 줄에
<td height="25" style="font-size:12px; font-weight:bold; text-align:center; border-bottom:1px solid #d9d9d9;">
<a href="<?=$s_href[$i][$j]?>" onmouseover="this.style.fontWeight='bold';this.style.color='#d30842';" onmouseout="this.style.fontWeight='';this.style.color='';"><?=$s_menu[$i][$j]?>
<span style="font-size:10px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
이 부분에서 마우스오버 아웃 뒷편으로 class="subject" 도 붙여봤는데, 적용도 안되구요 ㅠㅠ
어찌 잘 안됩니다. ㅠㅠ 답답한 마음에 질문까지 올려봅니다~
마우스오버 색상과 마우스오버 아웃 색상 소스는 없어도 되고,
메뉴클릭시 .. 아 내가 이 게시판에서 글을 읽고 잇구나~ 라고 생각할수 잇게,
메뉴클릭시 색상변경만 빨간색으로 하면 되거든요..
왜이렇게 안되는지.. 뭐가 잘못됐는지 알수가 없네요.. ㅠㅠ
정말 좋은 예로 ... 바로 옆에 SIR 우측메뉴바를 보시면,
질문답변 클릭하시면 게시판 이동되면서 질문답변에 글씨색상이 분홍색으로 바뀌잖아요~
이것을 표현하고 싶은데요.. 모든 검색을 다 해서 해봤는데도 안되서 질문까지 올립니다. ㅠㅠ
우선 제가 쓰는 좌측 메뉴바 소스는 첨부로 걸었습니다~
파일 9 번째 줄에
<style>
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
</style>
이렇게 해놓았고,
138 번 줄에
<td height="25" style="font-size:12px; font-weight:bold; text-align:center; border-bottom:1px solid #d9d9d9;">
<a href="<?=$s_href[$i][$j]?>" onmouseover="this.style.fontWeight='bold';this.style.color='#d30842';" onmouseout="this.style.fontWeight='';this.style.color='';"><?=$s_menu[$i][$j]?>
<span style="font-size:10px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
이 부분에서 마우스오버 아웃 뒷편으로 class="subject" 도 붙여봤는데, 적용도 안되구요 ㅠㅠ
어찌 잘 안됩니다. ㅠㅠ 답답한 마음에 질문까지 올려봅니다~
마우스오버 색상과 마우스오버 아웃 색상 소스는 없어도 되고,
메뉴클릭시 .. 아 내가 이 게시판에서 글을 읽고 잇구나~ 라고 생각할수 잇게,
메뉴클릭시 색상변경만 빨간색으로 하면 되거든요..
왜이렇게 안되는지.. 뭐가 잘못됐는지 알수가 없네요.. ㅠㅠ
댓글 전체
<a href="<?=$s_href[$i][$j]?>" onmouseover="this.style.fontWeight='bold';this.style.color='#d30842';" onmouseout="this.style.fontWeight='';this.style.color='';"><?=$s_menu[$i][$j]?>
부분을
<?
$menu_event = " onmouseover=\"this.style.fontWeight='bold';this.style.color='#d30842';\" onmouseout=\"this.style.fontWeight='';this.style.color='';\"; ";
if($bo_table=="g4_qa"){$menu_event = " class='subject'"; }
else if($bo_table=="g4_qa1"){$menu_event = " class='subject' "; }
?>
<a href="<?=$s_href[$i][$j]?>" ><?=$s_menu[$i][$j]?>
현재 위치를 알아야 메뉴선택이 되었는지 알수 있기때문에 조건문을 써주시면 되실듯 하고요
보통 게시판은 $bo_table 값이 넘어 오니 $bo_table 값으로
만약에 게시판이 아니면 상단에 $g4[title] 을 이용하시거나
아니면 $LMenu = "메뉴명"; 으로 정의하시고
else if($LMenu=="메뉴명"){$menu_event = " class='subject' "; }
처리하시면 될듯 합니다
부분을
<?
$menu_event = " onmouseover=\"this.style.fontWeight='bold';this.style.color='#d30842';\" onmouseout=\"this.style.fontWeight='';this.style.color='';\"; ";
if($bo_table=="g4_qa"){$menu_event = " class='subject'"; }
else if($bo_table=="g4_qa1"){$menu_event = " class='subject' "; }
?>
<a href="<?=$s_href[$i][$j]?>" ><?=$s_menu[$i][$j]?>
현재 위치를 알아야 메뉴선택이 되었는지 알수 있기때문에 조건문을 써주시면 되실듯 하고요
보통 게시판은 $bo_table 값이 넘어 오니 $bo_table 값으로
만약에 게시판이 아니면 상단에 $g4[title] 을 이용하시거나
아니면 $LMenu = "메뉴명"; 으로 정의하시고
else if($LMenu=="메뉴명"){$menu_event = " class='subject' "; }
처리하시면 될듯 합니다
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
스타일 격식이 문제가 있는같네요.
아래와 같이 해보세요.
.subject a:hover { color:#FF0000; text-decoration:none; }
.subject a:active { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
스타일 격식이 문제가 있는같네요.
아래와 같이 해보세요.
.subject a:hover { color:#FF0000; text-decoration:none; }
.subject a:active { color:#FF0000; text-decoration:none; }
두 분 소중한 답변 감사합니다. 그런데 안되네요.. ㅠㅠ 아이공, 되게 어렵네요.. ㅠㅠ
$s_menu[$j][$gr_bo_c[$j]] = $g4_board[$i][bo_subject]; 밑에
$s_table[$j][$gr_bo_c[$j]] = $g4_board[$i][bo_table]; 추가해주시고
----------------------------------------------------------------------
<style>
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
</style>
부분을
<style>
/* 해당 게시판이 아닐떄 */
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
/* 해당 게시판일때 */
a.subject_on:link, a.subject_on:visited { text-decoration:none; color:#ccc; }
a.subject_on:hover { color:#FF0000; text-decoration:none; }
a.subject_on:active { color:#FF0000; text-decoration:none; }
</style>
로 바꿔주시면서 원하시는 색상 넣으시면 되구요
-------------------------------------------------------------------------
<td height="25" style="font-size:12px; font-weight:bold; text-align:center; border-bottom:1px solid #d9d9d9;">
<a href="<?=$s_href[$i][$j]?>" onmouseover="this.style.fontWeight='bold';this.style.color='#d30842';" onmouseout="this.style.fontWeight='';this.style.color='';"><?=$s_menu[$i][$j]?>
<span style="font-size:10px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
부분 (td~/td)을
<td height="20" style="border-bottom:1px solid #ebebeb;">
<a href="<?=$s_href[$i][$j]?>" class="subject<?=($s_table[$i][$j]==$_GET['bo_table'])?'_on':''?>"><?=$s_menu[$i][$j]?>
<span style="font-size:9px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
로 바꾸어주세요
-------------------------------------------------------------------------
이건.. 제가 테스트를 못해봐서 작동안될가능성이 크나..
해보시고 쪽지주신다면 열심히 도와드리겠습니다 ^^*
$s_table[$j][$gr_bo_c[$j]] = $g4_board[$i][bo_table]; 추가해주시고
----------------------------------------------------------------------
<style>
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
</style>
부분을
<style>
/* 해당 게시판이 아닐떄 */
a.subject:link, a.subject:visited { text-decoration:none; color:#454545; }
a.subject:hover { color:#FF0000; text-decoration:none; }
a.subject:active { color:#FF0000; text-decoration:none; }
/* 해당 게시판일때 */
a.subject_on:link, a.subject_on:visited { text-decoration:none; color:#ccc; }
a.subject_on:hover { color:#FF0000; text-decoration:none; }
a.subject_on:active { color:#FF0000; text-decoration:none; }
</style>
로 바꿔주시면서 원하시는 색상 넣으시면 되구요
-------------------------------------------------------------------------
<td height="25" style="font-size:12px; font-weight:bold; text-align:center; border-bottom:1px solid #d9d9d9;">
<a href="<?=$s_href[$i][$j]?>" onmouseover="this.style.fontWeight='bold';this.style.color='#d30842';" onmouseout="this.style.fontWeight='';this.style.color='';"><?=$s_menu[$i][$j]?>
<span style="font-size:10px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
부분 (td~/td)을
<td height="20" style="border-bottom:1px solid #ebebeb;">
<a href="<?=$s_href[$i][$j]?>" class="subject<?=($s_table[$i][$j]==$_GET['bo_table'])?'_on':''?>"><?=$s_menu[$i][$j]?>
<span style="font-size:9px; color:#FF6600"><? if($new_c[$i][$j]) echo " (".$new_c[$i][$j].")";?></span></a></td>
로 바꾸어주세요
-------------------------------------------------------------------------
이건.. 제가 테스트를 못해봐서 작동안될가능성이 크나..
해보시고 쪽지주신다면 열심히 도와드리겠습니다 ^^*
견해님 감사합니다. 쪽지드렸습니다. ^^