링크
<t (228)| 메뉴1 | 메뉴2 | 메뉴3 |
이런경우의 소스는 참 많지요.. jquery ui만 둘러봐도 이것저것 많은데.. 만약에
| 메뉴1 | 메뉴2 | 메뉴3 | 메뉴4 |
위와 같은 형식으로 100%를 주려면.. px계산하느라 애좀 먹겠지요.. 1px정도 차이가 자꾸날겁니다. 그래서 편하게 테이블로 맹구러버렸습니다..
/*탭메뉴관련 CSS*/
.tab_menu { text-align:center; padding:3px 2px;}
.tab_menu_first_on {
border:1px solid #cccccc;
border-bottom:none;
background-color:#ffffff;
cursor:normal;
}
.tab_menu_first_off {
border:1px solid #cccccc;
background-color:#f1f1f1;
cursor:pointer;
}
.tab_menu_other_on {
border-top :1px solid #cccccc;
border-right:1px solid #cccccc;
background-color:#ffffff;
cursor:normal;
}
.tab_menu_other_off {
border:1px solid #cccccc;
border-left:none;
background-color:#f1f1f1;
cursor:pointer;
}
.tab_content { border:1px solid #cccccc; border-top:none;}
.tab_content_on {display:block;}
.tab_content_off {display:none;}
.tab_button_more {clear:both; padding-top:5px; text-align:right;}
/*탭메뉴관련 script*/
$(document).ready(function(){
$(".tab_menu").click(function(){
var now_menu = $(this).attr('id');
var now_cont = now_menu.replace('tab_menu_','tab_cont_');
var id = now_menu.substring(0, now_menu.length - 3);
var idx = $('#'+id).find('.tab_menu').index(this);
if(idx == 0){
$('#'+id).find('.tab_menu:gt(0)').removeClass('tab_menu_other_on').addClass('tab_menu_other_off');
$('#'+id).find('.tab_menu:eq(0)').removeClass('tab_menu_first_off').addClass('tab_menu_first_on');
} else {
$('#'+id).find('.tab_menu:eq(0)').removeClass('tab_menu_first_on').addClass('tab_menu_first_off');
$('#'+id).find('.tab_menu:gt(0)').removeClass('tab_menu_other_on').addClass('tab_menu_other_off');
$('#'+now_menu).removeClass('tab_menu_other_off').addClass('tab_menu_other_on');
}
$('#'+id).find('.tab_content').removeClass('tab_content_on').addClass('tab_content_off');
$('#'+now_cont).removeClass('tab_content_off').addClass('tab_content_on');
});
});
/*
탭메뉴관련 html 앞의 test를 다른걸로 바꾸시면 되며
tab1_tab_menu, tab2_tab_menu등으로 여러개를 동시에 사용가능합니다.
또 중요한건 큰테이블의 아이디는 'xxxxxx_tab_menu'
탭메뉴들의 아이디는 'xxxxxx_tab_menu_01~99' 01~99는 영문이든 숫자든 상관없으며 2자리로 구성해주세요..
탭내용들의 아이디는 'xxxxxx_tab_cont_01~99' 01~99는 영문이든 숫자든 상관없으며 2자리로 구성해주세요.. 단 맵메뉴의 아이디 끝 두자리와 일치해야합니다.
*/
<table border=0 width=100% cellpadding=0 cellspacing=0 id='test_tab_menu'>
<tr>
<td width=25% id='test_tab_menu_01' class='tab_menu tab_menu_first_on'>내용1</td>
<td width=25% id='test_tab_menu_02' class='tab_menu tab_menu_other_off'>내용2</td>
<td width=25% id='test_tab_menu_03' class='tab_menu tab_menu_other_off'>내용3</td>
<td width=25% id='test_tab_menu_04' class='tab_menu tab_menu_other_off'>내용4</td>
</tr>
<tr>
<td colspan=4>
<table border=0 width=100% cellpadding=0 cellspacing=0 id='test_tab_cont_01' class='tab_content tab_content_on'>
<tr>
<td style='padding:10px 5px;'>내용1 내용1</td>
</tr>
</table>
<table border=0 width=100% cellpadding=0 cellspacing=0 id='test_tab_cont_02' class='tab_content tab_content_off'>
<tr>
<td style='padding:10px 5px;'>내용2 내용2</td>
</tr>
</table>
<table border=0 width=100% cellpadding=0 cellspacing=0 id='test_tab_cont_03' class='tab_content tab_content_off'>
<tr>
<td style='padding:10px 5px;'>내용2 내용3</td>
</tr>
</table>
<table border=0 width=100% cellpadding=0 cellspacing=0 id='test_tab_cont_04' class='tab_content tab_content_off'>
<tr>
<td style='padding:10px 5px;'>내용2 내용4</td>
</tr>
</table>
</td>
</tr>
</table>
혹시 div코딩으로 처리가능하신분은 올려주세요.. 하다하다 안되서
테이블 코딩해버린겁니다 ㅎㅎ;;
css코딩이 허접한지라.. ㅠ.ㅠ
댓글 4개
<style>
.tab_menu {float:left;}
</style>
<div id='test_tab_menu'>
<div id='test_tab_menu_01' class='tab_menu tab_menu_first_on'>내용1</div>
<div id='test_tab_menu_02' class='tab_menu tab_menu_first_off'>내용2</div>
<div id='test_tab_menu_03' class='tab_menu tab_menu_first_off'>내용3</div>
<div id='test_tab_menu_04' class='tab_menu tab_menu_first_off'>내용4</div>
<div>
혹시 상단에 있는 홈/로그인/로그아웃/회원가입-----------이 메뉴 인가요?
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 384 | ||
| 7929 | 9년 전 | 290 | ||
| 7928 | 9년 전 | 391 | ||
| 7927 | 9년 전 | 313 | ||
| 7926 | 9년 전 | 652 | ||
| 7925 | 9년 전 | 331 | ||
| 7924 | 9년 전 | 311 | ||
| 7923 | 9년 전 | 330 | ||
| 7922 | 9년 전 | 349 | ||
| 7921 | 9년 전 | 382 | ||
| 7920 | 9년 전 | 303 | ||
| 7919 | 9년 전 | 322 | ||
| 7918 | 9년 전 | 479 | ||
| 7917 | 9년 전 | 322 | ||
| 7916 | 9년 전 | 390 | ||
| 7915 | 9년 전 | 386 | ||
| 7914 | 9년 전 | 394 | ||
| 7913 | 9년 전 | 530 | ||
| 7912 | 9년 전 | 391 | ||
| 7911 | 9년 전 | 340 | ||
| 7910 | 9년 전 | 377 | ||
| 7909 | 9년 전 | 480 | ||
| 7908 | 9년 전 | 390 | ||
| 7907 | 9년 전 | 340 | ||
| 7906 | 9년 전 | 358 | ||
| 7905 | 9년 전 | 341 | ||
| 7904 | 9년 전 | 317 | ||
| 7903 | 9년 전 | 323 | ||
| 7902 | 9년 전 | 529 | ||
| 7901 |
|
9년 전 | 722 | |
| 7900 | 9년 전 | 554 | ||
| 7899 | 9년 전 | 356 | ||
| 7898 | 9년 전 | 358 | ||
| 7897 | 9년 전 | 311 | ||
| 7896 | 9년 전 | 340 | ||
| 7895 | 9년 전 | 443 | ||
| 7894 | 9년 전 | 363 | ||
| 7893 | 9년 전 | 303 | ||
| 7892 | 9년 전 | 357 | ||
| 7891 | 9년 전 | 734 | ||
| 7890 | 9년 전 | 1182 | ||
| 7889 | 9년 전 | 738 | ||
| 7888 |
limsy1987
|
9년 전 | 532 | |
| 7887 | 9년 전 | 521 | ||
| 7886 | 9년 전 | 410 | ||
| 7885 | 9년 전 | 382 | ||
| 7884 | 9년 전 | 385 | ||
| 7883 | 9년 전 | 375 | ||
| 7882 | 9년 전 | 400 | ||
| 7881 | 9년 전 | 412 | ||
| 7880 | 9년 전 | 537 | ||
| 7879 | 9년 전 | 435 | ||
| 7878 | 9년 전 | 1181 | ||
| 7877 | 9년 전 | 726 | ||
| 7876 | 9년 전 | 456 | ||
| 7875 | 9년 전 | 533 | ||
| 7874 |
|
9년 전 | 790 | |
| 7873 | 9년 전 | 491 | ||
| 7872 | 9년 전 | 644 | ||
| 7871 | 9년 전 | 460 | ||
| 7870 | 9년 전 | 588 | ||
| 7869 | 9년 전 | 402 | ||
| 7868 | 9년 전 | 406 | ||
| 7867 | 9년 전 | 400 | ||
| 7866 | 9년 전 | 465 | ||
| 7865 | 9년 전 | 418 | ||
| 7864 | 9년 전 | 486 | ||
| 7863 | 9년 전 | 480 | ||
| 7862 | 9년 전 | 446 | ||
| 7861 | 9년 전 | 608 | ||
| 7860 | 9년 전 | 603 | ||
| 7859 | 9년 전 | 383 | ||
| 7858 | 9년 전 | 683 | ||
| 7857 | 9년 전 | 1041 | ||
| 7856 | 9년 전 | 493 | ||
| 7855 | 9년 전 | 721 | ||
| 7854 | 9년 전 | 706 | ||
| 7853 | 9년 전 | 560 | ||
| 7852 | 9년 전 | 481 | ||
| 7851 | 9년 전 | 470 | ||
| 7850 | 9년 전 | 564 | ||
| 7849 | 9년 전 | 334 | ||
| 7848 | 9년 전 | 384 | ||
| 7847 | 9년 전 | 613 | ||
| 7846 | 9년 전 | 431 | ||
| 7845 | 9년 전 | 387 | ||
| 7844 | 9년 전 | 373 | ||
| 7843 | 9년 전 | 387 | ||
| 7842 | 9년 전 | 377 | ||
| 7841 | 9년 전 | 363 | ||
| 7840 | 9년 전 | 373 | ||
| 7839 | 9년 전 | 412 | ||
| 7838 | 9년 전 | 493 | ||
| 7837 | 9년 전 | 334 | ||
| 7836 | 9년 전 | 376 | ||
| 7835 | 9년 전 | 451 | ||
| 7834 |
|
9년 전 | 1176 | |
| 7833 | 9년 전 | 391 | ||
| 7832 | 9년 전 | 393 | ||
| 7831 | 9년 전 | 527 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기