css 위치 조정 질문 드립니다.
본문
<?
$g4_path = "../"; // common.php 의 상대 경로
include_once("$g4_path/common.php");
$menucolor = mt_rand(1,9);; //1에서 9사이의 숫자 랜덤출력 (1에서 9 사이의 숫자를 넣으세요.)
?>
<!-- 롤오버메뉴 스크립트 -->
<script language="javascript" >
function showMenu(layerID) {
document.getElementById(layerID).style.visibility = "visible";
}
function hodeMenu(layerID) {
document.getElementById(layerID).style.visibility = "hidden";
}
</script>
<style type="text/css">
#menubox { height:41px; width:1000px; background:url(<?=$g4[path]?>/bunkerbuilder/img/menubg<?=$menucolor;?>.png) no-repeat left top; padding-left:10px; z-index:10000;}
#menubox .menuhead { }
/* 그룹명 반복 부분 */
#menubox .menuhead .grmenu { float:left; font-size:13px; font-weight:700; line-height:40px; }
#menubox .menuhead .grmenu a { display:block; background:url(<?=$g4[path]?>/bunkerbuilder/img/part<?=$menucolor;?>.png) no-repeat right center; color:#ffffff; text-decoration:none; width:130px; height:40px; text-align:center; }
/* 우측 사용자 메뉴 */
#menubox .menuhead .grmenur {float:right; font-size:13px; font-weight:700; line-height:40px; }
#menubox .menuhead .grmenur a { display:block; background:url(<?=$g4[path]?>/bunkerbuilder/img/part<?=$menucolor;?>.png) no-repeat left center; color:#ffffff; text-decoration:none; width:150px; height:40px; text-align:center; }
/* 서브메뉴(게시판링크) 풍선부분 */
#menubox .menuhead div { width:148px; z-index:9999999999; }
#menubox .menuhead div .head{ width:148px; height:20px; line-height:1px; background:url(<?=$g4[path]?>/bunkerbuilder/img/baloon.png) no-repeat top center}
#menubox .menuhead div .list{ width:142px; border-right:3px solid #a8d0ec; border-left:3px solid #a8d0ec; background-color:#ffffff; color:#999999; }
#menubox .menuhead div .list .link { font-size:12px; background-color:ffffff; }
#menubox .menuhead div .list .link a { display:block; line-height:30px; color:#333333; text-decoration:none; padding-left:25px; width:115px; margin-left:1px;}
#menubox .menuhead div .list .link a:hover {background:url(<?=$g4[path]?>/bunkerbuilder/img/qwqw1w1_07.png) no-repeat left center #e1f1f6;}
#menubox .menuhead div .tail{background:url(<?=$g4[path]?>/bunkerbuilder/img/baloon.png) no-repeat bottom; width:148px; height:10px; line-height:2px; font-size:2px;}
</style>
<?php
$excgr = "('html', 'banner', 'admin')"; // 보이지 않도록 제외시킬 그룹명
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_9, a.gr_10, b.mb_id FROM $g4[group_table] AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0' and a.gr_id not in " . $excgr . " ORDER BY a.gr_1";
$result = sql_query($sql);
?>
<!-- 메인메뉴 -->
<div id="menubox">
<?php for ($i=0; $i < count($row=sql_fetch_array($result)); $i++) {
$gSubject = ($row['gr_id'] == $gr_id)?$row['gr_subject']:$row['gr_subject'];//그룹제목
$glink = (!empty($row['gr_10']))?$row['gr_10']:$g4[path].'/bbs/'.'group.php?gr_id=' .$row['gr_id'];//그룹링크
?>
<div class="menuhead" >
<span class="grmenu"><a href onmouseout="javascript:hodeMenu('submenu<?=$i;?>');" onmouseover="javascript:showMenu('submenu<?=$i;?>');" ><?=$gSubject;?></a></span>
<div id="submenu<?=$i;?>" onmouseout="javascript:hodeMenu('submenu<?=$i;?>');" onmouseover="javascript:showMenu('submenu<?=$i;?>');" style=" margin-left:<? $submargin = ($i*130); echo $submargin; ?>px; margin-top:32px; position:absolute; visibility:hidden;">
<div class="head"> </div>
<div class="list">
<?
$sqlb = " select bo_subject, bo_table, bo_category_list, bo_9, bo_10 from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') order by bo_order_search";
$resultb = sql_query($sqlb);
for ($j=0; $rowb=sql_fetch_array($resultb); $j++) {
$tmp_write_table = $g4[write_prefix] . $rowb[bo_table];
$tmp_write_table_category = $g4[write_prefix] . $rowb[bo_table] . $rowb[bo_category_list];
///////////게시판호출/////////////////////
$bSubject = ($rowb['bo_table'] == $bo_table)?cut_str(get_text($rowb['bo_subject']),100,""):cut_str(get_text($rowb['bo_subject']), 100,"");//게시판제목
$bLink = (!empty($rowb['bo_10']))?$rowb['bo_10']:$g4[path].'/bbs/'.'board.php?bo_table=' .$rowb['bo_table'];//게시판링크
echo "<div class='link'><a href='$bLink' >$bSubject</a></div>";
}
?>
</div> <!-- 서브 메뉴반복닫기 -->
<div class="tail"></div><!-- 아랫쪽블럭닫기-->
</div>
</div><? } ?><!-- 이게 메뉴헤드 반복 닫기임-->
<!-- 우측메뉴 -->
<div class="menuhead" >
<span class="grmenur"><a href onmouseout="javascript:hodeMenu('submenuq');" onmouseover="javascript:showMenu('submenuq');" >마이벙커스페셜</a></span>
<div id="submenuq" onmouseout="javascript:hodeMenu('submenuq');" onmouseover="javascript:showMenu('submenuq');" style=" margin-top:35px; margin-left:840px; float:right; position:absolute; visibility:hidden;">
<div class="head"> </div>
<div class="list">
<span class='link'><a href='<?=$g4[path]?>/' >예비1</a></span>
<span class='link'><a href='<?=$g4[path]?>/' >예비2</a></span>
<span class='link'><a href='<?=$g4[path]?>/' >예비3</a></span>
</div> <!-- 서브 메뉴반복닫기 -->
<div class="tail"></div><!-- 아랫쪽블럭닫기-->
</div>
<!--우측메뉴 끝 -->
</div>
메뉴목록 하고 바를 센터로 정렬 하려면 어떻게 해야 될까요???
답변 2
#menubox { height:41px; width:1000px; background:url(<?=$g4[path]?>/bunkerbuilder/img/menubg<?=$menucolor;?>.png) no-repeat left top; padding-left:10px; z-index:10000; margin:0 auto;}
느낌상 이부분 글씨로만 보려니 가독성이 떨어지네요..
사이트주소 첨부해주시면 감사하겠습니다..
#menubox { height:41px; width:1000px; background:url(<?=$g4[path]?>/bunkerbuilder/img/menubg<?=$menucolor;?>.png) no-repeat left top; padding-left:10px; z-index:10000; text-align:center;}
#menubox .menuhead { }
/* 그룹명 반복 부분 */
#menubox .menuhead .grmenu {display:inline-block; *display:inline; *zoom:1; font-size:13px; font-weight:700; line-height:40px; }
float:left; 이걸 지우고. display:inline-block; *display:inline; *zoom:1;
이렇게 해보세요