해상도에 따른 아이콘 위치변화.. 정보
해상도에 따른 아이콘 위치변화..본문
안녕하십니까.
다름이 아니고.. 제가 좀 무지한편이라..
도움을 얻고자 질문을 올립니다..
보시다시피 해상도에 변화를주면 위치가 엉뚱한 곳으로 벗어납니다.
제가 아는한도내에서 이것저것 해봤지만.. 통 못하겠네요 ^^
<form name="fsearch" method="get" action="<?=$g4[bbs_path]?>/search.php" style="display:inline">
<input type="hidden" name="srows" value="<?=$srows?>">
<tr>
<td style='padding:0 20px;' height="25">
<?
$group_select = "<select style='width:82px; height:19px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>사이트";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'house' and gr_id != 'couple' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
<input type="hidden" name="srows" value="<?=$srows?>">
<tr>
<td style='padding:0 20px;' height="25">
<?
$group_select = "<select style='width:82px; height:19px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>사이트";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'house' and gr_id != 'couple' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
echo $group_select;
?>
<span id="snowsoft_open" style="position:absolute; margin-left:185px; margin-top:5px; left: 470px; top: 110px;" onClick="search_on_click();"><a href="javascript:;" onClick="search_on();"><img src="<?=$search_skin_path?>/img/arrow.gif" border="0"></a></span>
?>
<span id="snowsoft_open" style="position:absolute; margin-left:185px; margin-top:5px; left: 470px; top: 110px;" onClick="search_on_click();"><a href="javascript:;" onClick="search_on();"><img src="<?=$search_skin_path?>/img/arrow.gif" border="0"></a></span>
<input type=text name=stx maxlength=100 required itemname="검색어" value="<?=$text_stx?>" style="width:310px; height:21;" onKeyUp="search_idsu(this,arguments[0]);" autocomplete="off">
<td width="50" height="20">
<input type="image" src="images/search_btn.gif" border="0" align="absmiddle" onFocus="this.blur()"></td>
<span style="position:absolute;margin-left:210px;margin-top:29px;"><span id="search_" style="display:none;width:305px;height:100px;background-color:#FFFFFF;" align="center"></span></span>
<td width="50" height="20">
<input type="image" src="images/search_btn.gif" border="0" align="absmiddle" onFocus="this.blur()"></td>
<span style="position:absolute;margin-left:210px;margin-top:29px;"><span id="search_" style="display:none;width:305px;height:100px;background-color:#FFFFFF;" align="center"></span></span>
소스 좀 보시구. 꼭 답변 부탁드립니다 ^^
수고하세요.
댓글 전체
position:absolute; 이게 넣어서 그럴걸요 ㅋ
뭐 저는 이렇게 사용합니다만...
예제 링크)
http://www.morssola.com/test.php
예제 링크의 코드 (예제링크는 언제 짤릴지 모릅니다. ㅎ)
=================================================
test.php
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "죽음이 갈라놓을 때까지, 모르솔라";
include_once("$g4[path]/head.sub.php");
?>
<table bgcolor="#ff3300" width="420" height="75" cellpadding="0" cellspacing="0" border="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="83" height="12"></td>
<td width="288"></td>
<td width="50"></td>
</tr>
<tr>
<td width="83" height="22">
<?
$group_select = "<select style='width:83px; height:19px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>사이트";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'cafe' and gr_id != 'couple' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
echo $group_select;
?></td>
<td width="288" align="center">
<input type="text" name="stx" style="width:275px; height:19px; background:#ffffff;border:1px;" class=scinput tabindex=1></td>
<td width="50">
<input type="image" src="<?=$g4['path']?>/images/btn_search_r.gif" width="55" height="21" border="0" align="absmiddle" onfocus="this.blur()"></td>
</tr>
<tr>
<td width="420" height="41" colspan="3"></td>
</tr>
</form>
</table>
<script language="JavaScript">
document.onload = document.fsearchbox.stx.focus();
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
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;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
<?
include_once("$g4[path]/tail.sub.php");
?>
예제 링크)
http://www.morssola.com/test.php
예제 링크의 코드 (예제링크는 언제 짤릴지 모릅니다. ㅎ)
=================================================
test.php
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "죽음이 갈라놓을 때까지, 모르솔라";
include_once("$g4[path]/head.sub.php");
?>
<table bgcolor="#ff3300" width="420" height="75" cellpadding="0" cellspacing="0" border="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="83" height="12"></td>
<td width="288"></td>
<td width="50"></td>
</tr>
<tr>
<td width="83" height="22">
<?
$group_select = "<select style='width:83px; height:19px;' id='gr_id' name='gr_id' class=select><option value=''>통합검색<option value='site'>사이트";
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_1 != 'cafe' and gr_id != 'couple' and gr_id != 'redcast' and gr_id != 'none' and gr_id != 'support' order by gr_id ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
$group_select .= "<option value='$row[gr_id]'>$row[gr_subject]";
$group_select .= "</select>";
echo $group_select;
?></td>
<td width="288" align="center">
<input type="text" name="stx" style="width:275px; height:19px; background:#ffffff;border:1px;" class=scinput tabindex=1></td>
<td width="50">
<input type="image" src="<?=$g4['path']?>/images/btn_search_r.gif" width="55" height="21" border="0" align="absmiddle" onfocus="this.blur()"></td>
</tr>
<tr>
<td width="420" height="41" colspan="3"></td>
</tr>
</form>
</table>
<script language="JavaScript">
document.onload = document.fsearchbox.stx.focus();
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
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;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
<?
include_once("$g4[path]/tail.sub.php");
?>
와~~ 감사합니다!! position:absolute; 이걸 계속 바꿔봤는데 relative 이걸로 바꿨더니 위치가 고정이 되는군요.
감사합니다!!
감사합니다!!