가운데에 이..상한 여백이..
[code]
<?
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");
//sms4 적용여부를 설정 (관리자 또는 회원간 sms보내기가 허용될 때)
if ($is_admin || ($config[cf_sms4_member] && $member[mb_level] >= $config[cf_sms4_level])) {
include_once("$g4[path]/lib/sms.lib.php");
}
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = "1074";
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head profile="http://www.w3.org/2000/08/w3c-synd/#">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Layout Test</title>
<style type="text/css">
body { text-align:center; }
#container {width: 950px;}
#top {width: 100%; height:100px; background-color: #f5f5f5;}
#leftside {width:200px; height:1000px; float: left;}
.snb {width: 200px; height:100px; margin: 10px 0; background-color: #aaaaaa;}
.snb1 {width: 200px; height:250px; margin: 10px 0; background-color: #ccc;}
#contentsbox {width: 500px; height:1000px; background-color:#ccc;}
#rightside {width: 250px; height:1000px; float: right;}
.right { width:250px; height:200px;background-color: #aaaaaa;}
.right1 { width:250px; height:200px;background-color: #ccc;}
#bottom {width: 100%; height: 100px; background-color: #aaaaaa; clear: both;}
.search-button { width:50px; height:40px; background-color:#ff7700; color:#fff; font-weight:bold; }
</style>
</head>
<body>
<div id="container">
<div id="top">
<form name=fsearch action="<?=$g4[bbs_path]?>/search.php?sfl=wr_subject&sop=and&stx=">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type=text size=40 name=stx style="border:5px solid #fc8826; height:20px; font-size:15px; font-weight:bold; padding:5px;">
<input type=submit value="검색" class="search-button">
</form>
</center></div>
<!-- 왼쪽 영역 -->
<div id="leftside">
<div class="snb"><?=outlogin("sir");?></div>
<div class="snb1"><?include_once("$g4[path]/rank/rank.php");?></div>
</div>
<!-- 문제의 영역 --!>
<div id="contetntsbox"><img src="./img/sir.gif" border="0" width="500" height="105 "></div>
<!--오른쪽 영역 -->
<div id="rightside">
<div class="right">right</div>
<div class="right1">right1</div>
</div>
<div id="bottom">Bottom Box</div>
</div>
</body>
</html>
[/code]
이상하군요.. 메인에 왼쪽 여백준적 없는데.. 왜이럴까요..;( 메인에 그림보시면 여백때문에 밀린걸 보셨을겁니다..)
뭘적용해줘야 할까요??..
링크는 http://sm1201.inour.net/
<?
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");
//sms4 적용여부를 설정 (관리자 또는 회원간 sms보내기가 허용될 때)
if ($is_admin || ($config[cf_sms4_member] && $member[mb_level] >= $config[cf_sms4_level])) {
include_once("$g4[path]/lib/sms.lib.php");
}
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = "1074";
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head profile="http://www.w3.org/2000/08/w3c-synd/#">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Layout Test</title>
<style type="text/css">
body { text-align:center; }
#container {width: 950px;}
#top {width: 100%; height:100px; background-color: #f5f5f5;}
#leftside {width:200px; height:1000px; float: left;}
.snb {width: 200px; height:100px; margin: 10px 0; background-color: #aaaaaa;}
.snb1 {width: 200px; height:250px; margin: 10px 0; background-color: #ccc;}
#contentsbox {width: 500px; height:1000px; background-color:#ccc;}
#rightside {width: 250px; height:1000px; float: right;}
.right { width:250px; height:200px;background-color: #aaaaaa;}
.right1 { width:250px; height:200px;background-color: #ccc;}
#bottom {width: 100%; height: 100px; background-color: #aaaaaa; clear: both;}
.search-button { width:50px; height:40px; background-color:#ff7700; color:#fff; font-weight:bold; }
</style>
</head>
<body>
<div id="container">
<div id="top">
<form name=fsearch action="<?=$g4[bbs_path]?>/search.php?sfl=wr_subject&sop=and&stx=">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type=text size=40 name=stx style="border:5px solid #fc8826; height:20px; font-size:15px; font-weight:bold; padding:5px;">
<input type=submit value="검색" class="search-button">
</form>
</center></div>
<!-- 왼쪽 영역 -->
<div id="leftside">
<div class="snb"><?=outlogin("sir");?></div>
<div class="snb1"><?include_once("$g4[path]/rank/rank.php");?></div>
</div>
<!-- 문제의 영역 --!>
<div id="contetntsbox"><img src="./img/sir.gif" border="0" width="500" height="105 "></div>
<!--오른쪽 영역 -->
<div id="rightside">
<div class="right">right</div>
<div class="right1">right1</div>
</div>
<div id="bottom">Bottom Box</div>
</div>
</body>
</html>
[/code]
이상하군요.. 메인에 왼쪽 여백준적 없는데.. 왜이럴까요..;( 메인에 그림보시면 여백때문에 밀린걸 보셨을겁니다..)
뭘적용해줘야 할까요??..
링크는 http://sm1201.inour.net/
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 33개
div에 속성이 없는한 몰록형태로 아랴로 쌓이게 되는데 현제 상태는 아무 옵션도 없습니다.
<input type=hidden name=mb_sex value='<?=$member[mb_sex]?>'>
이것 대문에 글씨들도 중앙 정렬 되네요.
body { text-align:center; }
다른소스는 안먹히던데..
중앙에 왜 플롯을 주나하겟지만 혹시나해도 .. 안되던데..
해당소스 빼보앗더니. 문제는해결되엇으나 전체가 왼쪽----
그리고
div {text-align:left}
흠... 말하고 보니 나도 쫌 이상한것 같은데... 역시 해봐야알지 ㅋㅋ
html head tag 가 두번식 들어간....
전 실수로 4~6개 넣읁적도 있는데 그걸로 오류나는 경우는 없었습니다 ㅋㅋ
http://sm1201.inour.net/ <- 실제 적용된 페이지에서 소스보기해서 보시면.... 중복되어 있습니다. 스타일 시트도 두번 정의되어 있고...
<중복은 당연히 안되구요.>
rightside = float:right
contentsbox = float:left or float:right
시키셔야 될거같습니다.
또는 float되는 div들을 contentsbox위에 써주시거나요.
같은 뎁스의 div들을 float 시키냐 안시키냐에 따라 우선순위가 달라질 수도 있습니다.
<div id="contetntsbox"> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
저에게 채택됬네요....
메인 전체를 div로 감싸고
그안에 좌우측으로 div를 두고 뿌리면됩니다.
┌───┐
│ㅁ ㅁ │
└───┘
이런식이랄까 메인 div형식 ^^
타이핑하기 귀찮아서 안썼는데. 제가 말하는 형식도 모노폴리님 방식과 흡사합니다.^^
<div id="contentsbox"><img src="./img/sir.gif" border="0" width="500" height="105 "></div>
container {margin:0 auto;} 주시는걸 추천드립니다.
나중에 body에 넣은 텍스트정렬 센터가 어떠한 결과를낳을지 모르기에 ㅎ_ㅎ
전체정렬은 body { text-align:center} 여기서 담당하게되고
텍스트는 div {text-align:left} 여기서 담당하게되었습니다 ㅎㅎ
ie가 이상해서 가운데 정렬되는거 처럼 보이지만 크롬이나 파이어폭스로 보시면 왼쪽으로
쏠려있는걸 보시게 될겁니다.
촌스럽고 쪼금 무식해보이는 디자인이...
1년전 쯤 제가한 네이버 실시간 검색어를 연상시키네요..
rinx인가 여기거 좋던데요!