전체검색창관련 질문드립니다. 정보
전체검색창관련 질문드립니다.본문
사진을 보시면 검색창에 글씨가 위로 써져 있습니다.
글을 쓰면 가운데에 보여지고 싶은데 어떻게 할까요???
그 창 소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = 1004;
?>
<!-- 상단 배경 시작 -->
<style type="text/css">
<!--
.style2 {color: #DC3333}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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.01
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 && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('img/top/menu/1_2.gif','img/top/menu/2-2.gif','img/top/menu/3-2.gif','img/top/menu/4-2.gif','img/top/menu/5-2.gif','img/top/menu/6-2.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFE034"><table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="120" height="54"><img src="<?=$g4['path']?>/img/top/home.gif" width="120" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/favorite.gif" width="60" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/begin.gif" width="60" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/resistration.gif" width="60" height="50" /></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="left"><div align="right">HOME l 회원가입 l 로그인 l <span class="style2">왓이트</span>블로그 </div></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="228"><form name="fsearchbox" method="get" onSubmit="return fsearchbox_submit(this);" style="margin:0px;">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<tr>
<td width="24" height="25" align="center"> </td>
<td width="180" align="center" valign="middle" bgcolor="#ffffff"><input type="hidden" name="sfl" value="wr_subject||wr_content" />
<input type="hidden" name="sop" value="and" />
<input name="stx" type="text" style="BORDER : 0px solid; width: 180px; HEIGHT: 35px; BACKGROUND-COLOR: #ffffff" value="원하는키워드검색을하세요"></td>
<td width="42" align="center"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="42" height="37" border="0"></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle" background="<?=$g4['path']?>/img/top/menu/bg.gif"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','<?=$g4['path']?>/img/top/menu/1_2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/1-1.gif" name="Image5" width="177" height="70" border="0" id="Image5" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','<?=$g4['path']?>/img/top/menu/2-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/2-1.gif" name="Image6" width="203" height="70" border="0" id="Image6" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','<?=$g4['path']?>/img/top/menu/3-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/3-1.gif" name="Image7" width="185" height="70" border="0" id="Image7" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','<?=$g4['path']?>/img/top/menu/4-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/4-1.gif" name="Image8" width="145" height="70" border="0" id="Image8" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','<?=$g4['path']?>/img/top/menu/5-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/5-1.gif" name="Image9" width="175" height="70" border="0" id="Image9" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','<?=$g4['path']?>/img/top/menu/6-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/6-1.gif" name="Image10" width="139" height="70" border="0" id="Image10" /></a></td>
</tr>
</table>
<script type="text/javascript">
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "<?=$g4['bbs_path']?>/search.php";
return true;
}
</script>
글을 쓰면 가운데에 보여지고 싶은데 어떻게 할까요???
그 창 소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = 1004;
?>
<!-- 상단 배경 시작 -->
<style type="text/css">
<!--
.style2 {color: #DC3333}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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.01
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 && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('img/top/menu/1_2.gif','img/top/menu/2-2.gif','img/top/menu/3-2.gif','img/top/menu/4-2.gif','img/top/menu/5-2.gif','img/top/menu/6-2.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFE034"><table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="120" height="54"><img src="<?=$g4['path']?>/img/top/home.gif" width="120" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/favorite.gif" width="60" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/begin.gif" width="60" height="50" /></td>
<td width="60"><img src="<?=$g4['path']?>/img/top/resistration.gif" width="60" height="50" /></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="left"><div align="right">HOME l 회원가입 l 로그인 l <span class="style2">왓이트</span>블로그 </div></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="228"><form name="fsearchbox" method="get" onSubmit="return fsearchbox_submit(this);" style="margin:0px;">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<tr>
<td width="24" height="25" align="center"> </td>
<td width="180" align="center" valign="middle" bgcolor="#ffffff"><input type="hidden" name="sfl" value="wr_subject||wr_content" />
<input type="hidden" name="sop" value="and" />
<input name="stx" type="text" style="BORDER : 0px solid; width: 180px; HEIGHT: 35px; BACKGROUND-COLOR: #ffffff" value="원하는키워드검색을하세요"></td>
<td width="42" align="center"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="42" height="37" border="0"></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle" background="<?=$g4['path']?>/img/top/menu/bg.gif"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','<?=$g4['path']?>/img/top/menu/1_2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/1-1.gif" name="Image5" width="177" height="70" border="0" id="Image5" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','<?=$g4['path']?>/img/top/menu/2-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/2-1.gif" name="Image6" width="203" height="70" border="0" id="Image6" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','<?=$g4['path']?>/img/top/menu/3-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/3-1.gif" name="Image7" width="185" height="70" border="0" id="Image7" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','<?=$g4['path']?>/img/top/menu/4-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/4-1.gif" name="Image8" width="145" height="70" border="0" id="Image8" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','<?=$g4['path']?>/img/top/menu/5-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/5-1.gif" name="Image9" width="175" height="70" border="0" id="Image9" /></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','<?=$g4['path']?>/img/top/menu/6-2.gif',1)"><img src="<?=$g4['path']?>/img/top/menu/6-1.gif" name="Image10" width="139" height="70" border="0" id="Image10" /></a></td>
</tr>
</table>
<script type="text/javascript">
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "<?=$g4['bbs_path']?>/search.php";
return true;
}
</script>
댓글 전체
검색창에 css를이용해서 padding 을 조절해 보세요
padding-top: 5px;
padding-top: 5px;