묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
메뉴간 간격없이 하고싶은데 조금씩 벌어지네요.
2005.05.27 17:03
이미지 파일첨부를 할수 없네요.
아래 소스는 왼쪽 메뉴 부분입니다.
세로 배열되어 있고. 메뉴간 간격이 없도록 하고 싶은데..
이미지간 조금씩 1~2mm 정도 간격이 띄어져 있습니다.
아직 저의 실력으론 파악을 못하여 도움을 요청합니다.
스크립트는 메뉴위로 마우스 올리면 이미지가 바뀌는 것입니다.
답변 부탁드립니다.
..............................................................
<html>
<head>
<title>직원광장</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript">
<!--
function openWin1(url) {
var myWin = window.open(url, "mywin", "RESIZABLE=yes,scrolling='NO',TOOLBAR=yes,top=0,left=0,WIDTH=1024,HEIGHT=768");
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v3.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="images/left/background.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="left" valign="top" height="106">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/left/emp_1.gif" width="148" height="26"></td>
</tr>
<tr>
<td><img src="images/left/l_nosa_1.gif" width="148" height="24"></td>
</tr>
<tr>
<!-- 자유토론방 -->
<td height="9"><a href="http://aaaaaa/free_news/list.html?code=pds" onClick="MM_nbGroup('down','group1','nosa_2','images/left/l_nosa_2-1.gif',1)" onMouseOut="MM_nbGroup('out')" onMouseOver="MM_nbGroup('over','nosa_2','images/left/l_nosa_2-1.gif','+ '+ '',1)" target="center"><img src="images/left/l_nosa_2.gif" width="148" height="24" border="0" name="nosa_2"></a>
</td>
</tr>
<tr>
<td height="5">
<!-- Speak Up 제도 -->
<a href="http://aaaaa/speakup/speak_list.html" onClick="MM_nbGroup('down','group1','nosa_3','images/left/l_nosa_3-1.gif',1)" onMouseOut="MM_nbGroup('out')" onMouseOver="MM_nbGroup('over','nosa_3','images/left/l_nosa_3-1.gif','',1)" target="center"><img src="images/left/l_nosa_3.gif" width="148" height="24" border="0" name="nosa_3"></a>
</td>
</tr>
<tr><td>
............
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td valign="bottom" align="left" height="284">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="284">
<tr>
<td><img src="images/left/emp_4.gif" width="148" height="100"></td>
</tr>
<tr>
<td><img src="images/left/emp_5.gif" width="148" height="97"></td>
</tr>
<tr>
<td><img src="images/left/emp_6.gif" width="148" height="87"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
아래 소스는 왼쪽 메뉴 부분입니다.
세로 배열되어 있고. 메뉴간 간격이 없도록 하고 싶은데..
이미지간 조금씩 1~2mm 정도 간격이 띄어져 있습니다.
아직 저의 실력으론 파악을 못하여 도움을 요청합니다.
스크립트는 메뉴위로 마우스 올리면 이미지가 바뀌는 것입니다.
답변 부탁드립니다.
..............................................................
<html>
<head>
<title>직원광장</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript">
<!--
function openWin1(url) {
var myWin = window.open(url, "mywin", "RESIZABLE=yes,scrolling='NO',TOOLBAR=yes,top=0,left=0,WIDTH=1024,HEIGHT=768");
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v3.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="images/left/background.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="left" valign="top" height="106">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/left/emp_1.gif" width="148" height="26"></td>
</tr>
<tr>
<td><img src="images/left/l_nosa_1.gif" width="148" height="24"></td>
</tr>
<tr>
<!-- 자유토론방 -->
<td height="9"><a href="http://aaaaaa/free_news/list.html?code=pds" onClick="MM_nbGroup('down','group1','nosa_2','images/left/l_nosa_2-1.gif',1)" onMouseOut="MM_nbGroup('out')" onMouseOver="MM_nbGroup('over','nosa_2','images/left/l_nosa_2-1.gif','+ '+ '',1)" target="center"><img src="images/left/l_nosa_2.gif" width="148" height="24" border="0" name="nosa_2"></a>
</td>
</tr>
<tr>
<td height="5">
<!-- Speak Up 제도 -->
<a href="http://aaaaa/speakup/speak_list.html" onClick="MM_nbGroup('down','group1','nosa_3','images/left/l_nosa_3-1.gif',1)" onMouseOut="MM_nbGroup('out')" onMouseOver="MM_nbGroup('over','nosa_3','images/left/l_nosa_3-1.gif','',1)" target="center"><img src="images/left/l_nosa_3.gif" width="148" height="24" border="0" name="nosa_3"></a>
</td>
</tr>
<tr><td>
............
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td valign="bottom" align="left" height="284">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="284">
<tr>
<td><img src="images/left/emp_4.gif" width="148" height="100"></td>
</tr>
<tr>
<td><img src="images/left/emp_5.gif" width="148" height="97"></td>
</tr>
<tr>
<td><img src="images/left/emp_6.gif" width="148" height="87"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
border, cellspacing, cellpadding을 다 0 값을 주면 테두리가 투명하지만 테두리자체는 아직도 있죠. 테이블없이 그냥 이미지를 페이지에 올려놓으면 안됄까요?
<img src="이미지.gif"><br><img src="이미지.gif">이렇게..
아니면 포토샵에서 rollover 메뉴를 만드시던가...
Rollover메뉴라면 java script로 이렇게 복잡하게 할필요없는데..