c

탭메뉴에 들어갈 내용의 관련 질문입니다.

안녕하세요. 정말 많은 도움을 받고있습니다.
이걸다 어케 갚아야할지 열심히 배우고 저도 나중에 도움을 드리고 싶어요.

탭메뉴를 만든건 아니고 다른 분껄 퍼왔습니다.
아래는 탭메뉴소스입니다,
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style type="text/css">

#ddimagetabs{
}

#ddimagetabs a{
display: block;
text-decoration: none;
font: bold 12px rix고딕b; /*tab font */
color: green yellow; /*font color */
width: 100px; /*width of tab image */
height: 22px; /*height of tab image */
float: left;
display: inline;
margin-left: 1px; /*spacing between tabs */
padding-top: 4px; /*vertical offset of tab text from top of tab*/
background-image:url(image/bluetab.gif); /*URL to tab image */
background-repeat: no-repeat;
text-align: center;
}

#ddimagetabs a:hover, #ddimagetabs a.current{
background-image:url(image/menubar copy.gif); /*URL to tab image onmouseover */
color: black;
}

#tabcontentcontainer{
width:750px; /*width of 2nd level content*/
height:710px; /*height of 2nd level content. Set to largest's content height to avoid jittering.*/
}

.tabcontent{
display:none;
}

</style>

<script type="text/javascript">

/***********************************************
* DD Tab Menu II script- ⓒ Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "sc1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes


////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false")
if (document.getElementById && turntosingle==0){
highlighttab(aobject)
if (previoustab!="")
document.getElementById(previoustab).style.display="none"
document.getElementById(cid).style.display="block"
previoustab=cid
}
}

function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collectddimagetabs()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}

function collectddimagetabs(){
var tabobj=document.getElementById("ddimagetabs")
tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
collectddimagetabs()
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

</script></HEAD>

<BODY>
<div id="ddimagetabs">
<a href="#" onMouseover="expandcontent('sc1', this) ">탭A</a> <a href="#" onMouseover="expandcontent('sc2', this)">탭B</a><a href="#" onMouseover="expandcontent('sc3', this)">탭c</a>
</div> <br style="clear:left" />
<table border=1><tr><td>
<DIV id="tabcontentcontainer">

<div id="sc1" class="tabcontent">탭A 들어갈내용</div>

<div id="sc2" class="tabcontent">탭B 들어갈내용</div>

<div id="sc3" class="tabcontent">탭C 들어갈내용</div>


</div>
</td></tr></table>
</BODY>
</HTML>

이런식의 간단한 탭메뉴입니다. 보기보다 아주 쓸만하더라구요.
그런데 탭메뉴에 들어갈 내용을 이미지나 텍스트로만 해봤거든요..

그런데 .....
쿼리문 작성한 걸 여기다 두면 내용이 아래로 밀리던가각 DB내용마다 칸이나오고
탭메뉴가 활성화가 안됩니다.

아래는 들어갈 쿼리문 내용입니다.
<?

//$result = mysql_query("select * from g4_write_yes4 order by wr_datetime desc limit 5");
$result2 = mysql_query("select * from paper_info order by no desc limit 7");
//$result3 = mysql_query("select * from g4_write_yes6 order by wr_datetime desc limit 5");


while($row2 = sql_fetch_array($result2)) {

##### 각 게시물 레코드의 필드값을 변수에 저장한다.
$reg_date = date("y-m-d",$row2[reg_date]);

if (($row2[reg_date]+48*3600) > time()){
$newicon = "[". $reg_date ."]" . "<img src='". $check . "/images/ico_new.gif' width='28' height='11'>";
} else {
$newicon = "[". $reg_date ."]";
}



$service_sort = $row2[sl_sort];
$name = substr($row2[name],0,4);

if($row2[s_code]=="1"){$pa_sort = $row2[paper_sort];}
elseif($row2[s_code]=="2"){$pa_sort = $row2[sl_sort];}
elseif($row2[s_code]=="3"){$pa_sort = "기타문의";}
elseif($row2[s_code]=="4"){$pa_sort = "수강신청서";}
elseif($row2[s_code]=="5"){$pa_sort = "수강서류";}

if($row2[ing] == "0"){$ing_text = "<font color=red>접수</font>";}
elseif($row2[ing] == "1"){$ing_text = "<font color=#FFA760>대기중</font>";}
elseif($row2[ing] == "2"){$ing_text = "<font color=#13AD99>추가상담</font>";}
elseif($row2[ing] == "3"){$ing_text = "<font color=green>답변완료</font>";}
elseif($row2[ing] == "4"){$ing_text = "<font color=#C040CB>통화대기</font>";}
elseif($row2[ing] == "5"){$ing_text = "<font color=#82CCAD>수정요청</font>";}
elseif($row2[ing] == "6"){$ing_text = "<font color=#A5CC82>주소수정중</font>";}
elseif($row2[ing] == "7"){$ing_text = "<font color=#CC82B6>입금요청</font>";}
elseif($row2[ing] == "8"){$ing_text = "<font color=#BFCC82>입금확인</font>";}
elseif($row2[ing] == "9"){$ing_text = "<font color=#CCBA82>처리요청</font>";}
elseif($row2[ing] == "10"){$ing_text = "<font color=#CC82B8>처리중</font>";}
elseif($row2[ing] == "11"){$ing_text = "<font color=#6E858E>발송준비</font>";}
elseif($row2[ing] == "12"){$ing_text = "<font color=#B1CAFF>확인요청</font>";}
elseif($row2[ing] == "13"){$ing_text = "<font color=blue>처리완료</font>";}

if($row2[dam_name]){
$dam_name = $row2[dam_name];
$endday = $row2[endyear]."년 ".$row2[endmon]."월 ".$row2[endday]."일";
}else{
$dam_name = "미 정";
$endday = "-";
}

if($row2[design_name])$design_name = $row2[design_name];
else $design_name = "미 정";
?>
<tr>
<td style="padding-left:10pt;padding-top:5pt;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="center">
<td align="left" width="100"><img src="<?=$check?>/images/m_icon.gif" align=absmiddle> <?=$newicon?></td>
<td width="90"><?=$pa_sort?></td>
<td width="60"><font color='#AFDB00'><?=$name?>*</font></td>
<td width="70"><font color='blue'><?=$dam_name?></font></td>
<td width="70"><font color='blue'><?=$design_name?></font></td>
<td width="40"><font color='red'><?=$row2[go_num]?> %</font></td>
<td width="100"><font color='red'><?=$endday?></font></td>
<td>[<?=$ing_text?>]</td>
</td>
</tr>
</table>
</td>
</tr>
<?
}
?>
위의 내용이 탭메뉴 내용에 들어가야하는데요.
정말 무지해서 그러는데 이미지나 텍스트 입력되어 정상작동하는 것처럼 방법이 없을까요?
|

댓글 1개

일단 얼핏 보아서 그냥 참조만 하신다면

html 태그중에
<tr> <-- 이 부분전에 테이블을 하나 열어주시거나
<td style="padding-left:10pt;padding-top:5pt;">
<-- 이 부분까지 삭제를 하시는게 맞을듯 합니다.

(가로 10 상단 5px 을 띄우게 되어 있지만 그 주변에 테이블을 여는 부분이 없는듯 합니다.)

<table>
<tr>
<td style="padding-left:10pt;padding-top:5pt;">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="center">
<td align="left" width="100"><img src="<?=$check?>/images/m_icon.gif" align=absmiddle> <?=$newicon?></td>
<td width="90"><?=$pa_sort?></td>
<td width="60"><font color='#AFDB00'><?=$name?>*</font></td>
<td width="70"><font color='blue'><?=$dam_name?></font></td>
<td width="70"><font color='blue'><?=$design_name?></font></td>
<td width="40"><font color='red'><?=$row2[go_num]?> %</font></td>
<td width="100"><font color='red'><?=$endday?></font></td>
<td>[<?=$ing_text?>]</td>
</td>
</tr>
</table>
</td>
</tr>
</table> <-- 이렇게 추가해 보시면 대충 모양은 나올듯 합니다.

그냥 html 문서적인 부분에서 본것이라 답변이 되지 않을수도 있습니다 ^^;;
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
10-03-28 조회 899
10-03-28 조회 1,098
10-03-28 조회 904
10-03-28 조회 1,902
10-03-28 조회 1,671
10-03-28 조회 908
10-03-28 조회 1,134
10-03-28 조회 1,071
10-03-28 조회 1,070
10-03-28 조회 1,090
10-03-28 조회 1,084
10-03-28 조회 1,126
10-03-28 조회 1,657
10-03-28 조회 1,133
10-03-28 조회 1,658
10-03-28 조회 1,203
10-03-28 조회 1,105
10-03-28 조회 1,367
10-03-28 조회 1,146
10-03-27 조회 946