좌측 카테고리가 색상과 높이등을 수정했는데
브라우저별로 너무 다르게 나옵니다.
좌측 카테고리를 1차에 오버했을때 2차가 나오는 메뉴를
1차와 2차가 다 나오게 하고싶어서 한번에 1차와 2차가 다보여지게 아래와 같이 수정했습니다.
문제는 색상과 높이를 직접 스타일을 주어서 수정했는데도 브라우저별로 색상및 높이가 너무 제각각입니다.
메뉴를 모두 펼치게 하는 상태에서 색상과 스타일을 동일하게 적용시키는 방법이 있을까요?
부탁드립니다.
소스가 이렇게 되어있어서
// 2단계 분류
$menubody = "";
$onmouseover = "";
$onmouseout = "";
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
where LENGTH(ca_id) = '4'
and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
and ca_use = '1'
order by ca_id ";
$result2 = sql_query($sql2);
$hnum2 = @mysql_num_rows($result2);
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{
$menubody .= "<tr height='22'><td> · <a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>$row2[ca_name]</a></td></tr>";
// 맨밑줄은 출력하지 않음
if ($j < $hnum2)
$menubody .= "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>";
}
$menubody = "";
$onmouseover = "";
$onmouseout = "";
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
where LENGTH(ca_id) = '4'
and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
and ca_use = '1'
order by ca_id ";
$result2 = sql_query($sql2);
$hnum2 = @mysql_num_rows($result2);
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{
$menubody .= "<tr height='22'><td> · <a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>$row2[ca_name]</a></td></tr>";
// 맨밑줄은 출력하지 않음
if ($j < $hnum2)
$menubody .= "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>";
}
if ($menubody)
{
$onmouseover = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'view', $sub_menu_left, -22); ";
$onmouseout = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'hide'); ";
}
{
$onmouseover = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'view', $sub_menu_left, -22); ";
$onmouseout = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'hide'); ";
}
$category_link = "<a href='$g4[shop_path]/list.php?ca_id=$row[ca_id]'>";
echo "<tr id='lmenu{$i}' onmouseover=\"$onmouseover\" onmouseout=\"$onmouseout\">";
echo "<td height='22'> · $category_link$row[ca_name]</a>\n";
echo "<tr id='lmenu{$i}' onmouseover=\"$onmouseover\" onmouseout=\"$onmouseout\">";
echo "<td height='22'> · $category_link$row[ca_name]</a>\n";
if ($menubody)
{
//echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; FILTER: alpha(opacity=95); z-index:999;'>";
echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; z-index:999;'>";
echo "<table cellpadding=1 cellspacing=0 bgcolor=#CCCCCC width=100%><tr><td>";
echo "<table border=0 width=100% bgcolor=#FFFFFF cellpadding=0 cellspacing=0>$menubody</table>";
echo "</td></tr></table>";
echo "</div>";
}
{
//echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; FILTER: alpha(opacity=95); z-index:999;'>";
echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; z-index:999;'>";
echo "<table cellpadding=1 cellspacing=0 bgcolor=#CCCCCC width=100%><tr><td>";
echo "<table border=0 width=100% bgcolor=#FFFFFF cellpadding=0 cellspacing=0>$menubody</table>";
echo "</td></tr></table>";
echo "</div>";
}
echo "</td></tr>\n";
if ($i<$hnum-1) // 맨밑줄은 출력하지 않음
echo "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>\n";
}
echo "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>\n";
}
if ($i==0)
echo "<tr><td height=50 align=center>등록된 자료가 없습니다.</td></tr>\n";
?>
</table>
echo "<tr><td height=50 align=center>등록된 자료가 없습니다.</td></tr>\n";
?>
</table>
<?=$menu?>
수정후
// 2단계 분류
$menubody = "";
$onmouseover = "";
$onmouseout = "";
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
where LENGTH(ca_id) = '4'
and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
and ca_use = '1'
order by ca_id ";
$result2 = sql_query($sql2);
$hnum2 = @mysql_num_rows($result2);
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{
$menubody .= "<tr><td class='menu02' height:'13px'> <a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>- $row2[ca_name]</a></td></tr>";
// 맨밑줄은 출력하지 않음
if ($j < $hnum2)
$menubody .= "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>";
}
$menubody = "";
$onmouseover = "";
$onmouseout = "";
$sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
where LENGTH(ca_id) = '4'
and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
and ca_use = '1'
order by ca_id ";
$result2 = sql_query($sql2);
$hnum2 = @mysql_num_rows($result2);
for ($j=0; $row2=sql_fetch_array($result2); $j++)
{
$menubody .= "<tr><td class='menu02' height:'13px'> <a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>- $row2[ca_name]</a></td></tr>";
// 맨밑줄은 출력하지 않음
if ($j < $hnum2)
$menubody .= "<tr><td align=center><img src='$g4[shop_img_path]/dot_line.gif'></td></tr>";
}
$category_link = "<a href='$g4[shop_path]/list.php?ca_id=$row[ca_id]' style='font-weight:bold; font-size:14px; color:#444; margin-left:10px;'>";
echo "<tr id='lmenu{$i}'>";
echo "<td class='menu_wrap'> $category_link$row[ca_name]</a>\n";
echo "<tr id='lmenu{$i}'>";
echo "<td class='menu_wrap'> $category_link$row[ca_name]</a>\n";
if ($menubody)
{
//echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; FILTER: alpha(opacity=95); z-index:999;'>";
echo "<div id='lmenu_layer{$i}' style='width:180px; position:relative; margin-left:14px; margin-top:10px; font-weight:bold; '>";
echo "<table cellpadding=1 cellspacing=0 width=100% ><tr><td>";
echo "<table border=0 width=100% cellpadding=0 cellspacing=0 >$menubody</table>";
echo "</td></tr></table>";
echo "</div>";
}
{
//echo "<div id='lmenu_layer{$i}' style='width:180px; display:none; position:absolute; FILTER: alpha(opacity=95); z-index:999;'>";
echo "<div id='lmenu_layer{$i}' style='width:180px; position:relative; margin-left:14px; margin-top:10px; font-weight:bold; '>";
echo "<table cellpadding=1 cellspacing=0 width=100% ><tr><td>";
echo "<table border=0 width=100% cellpadding=0 cellspacing=0 >$menubody</table>";
echo "</td></tr></table>";
echo "</div>";
}
echo "</td></tr>\n";
if ($i<$hnum-1) // 맨밑줄은 출력하지 않음
echo "<tr><td align=center > </td></tr>\n";
}
echo "<tr><td align=center > </td></tr>\n";
}
if ($i==0)
echo "<tr><td height=50 align=center >등록된 자료가 없습니다.</td></tr>\n";
?>
echo "<tr><td height=50 align=center >등록된 자료가 없습니다.</td></tr>\n";
?>
<tr>
<td height="9px" class="leftbottom_bg"> </td>
</tr>
<td height="9px" class="leftbottom_bg"> </td>
</tr>
</table>
<?=$menu?>
댓글 5개
게시글 목록
| 번호 | 제목 |
|---|---|
| 56073 | |
| 56067 | |
| 56065 | |
| 56060 | |
| 56058 | |
| 56055 | |
| 56051 | |
| 56048 | |
| 56044 | |
| 56043 | |
| 56042 | |
| 56039 | |
| 56035 | |
| 56032 | |
| 56030 | |
| 56028 | |
| 56025 | |
| 56018 | |
| 56012 | |
| 56010 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기