묻고답하기

안녕하세요.


홈페이지를 만드는 도중...


이것저것 웹 상에서 소스를 퍼서 사용하고 있었습니다.


최근게시물과 최근 이미지를 넣기 위하여 DIV 안에 테이블을 만들어서 사용하고 있었는데요...


테이블크기가 너무 커서...조금 줄일려고 하니까


가운데 정렬이 안되고 왼쪽 정렬이 되어 버리네요..


소스입니다. 보시구 판단해 주셨으면 합니다...




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>::Mabilis Home Stay::</title>

<style type="text/css"> 

<!--

body  {

font: 100% Verdana, Arial, Helvetica, sans-serif;

font-size: 12px; font-family: 맑은 고딕;

background-repeat : repeat-x;

margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */

padding: 0;

text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */

color: #000000;

}

#container {width:1004px; margin: 0 auto}

#header {width:1004px; height:300px;}

#content {width:1000px; float:right;}

#sidebar {

text-align:left;

width:230px;

float:left;

width: 169px;

background: #EBEBEB;

padding: 0px 5px 15px 20px;

}

#footer {width:1004px; height:50px; clear:both; background:#DDDDDD}

p {

font-family:맑은 고딕;

}

A:link {text-decoration:none; color:#024d82}

A:visited {text-decoration:none; color:#024d82}

A:hover {text-decoration:none; color:#148de3}

--> 

</style>


<script>

function roundTable(objID) {

var obj = document.getElementById(objID);

var Parent, objTmp, Table, TBody, TR, TD;

var bdcolor, bgcolor, Space;

var trIDX, tdIDX, MAX;

var styleWidth, styleHeight;

// get parent node

Parent = obj.parentNode;

objTmp = document.createElement('SPAN');

Parent.insertBefore(objTmp, obj);

Parent.removeChild(obj);

// get attribute

bdcolor = obj.getAttribute('rborder');

bgcolor = obj.getAttribute('rbgcolor');

radius = parseInt(obj.getAttribute('radius'));

if (radius == null || radius < 1) radius = 1;

else if (radius > 6) radius = 6;

MAX = radius * 2 + 1;

/*

create table {{

*/

Table = document.createElement('TABLE');

TBody = document.createElement('TBODY');

Table.cellSpacing = 0;

Table.cellPadding = 0;

for (trIDX=0; trIDX < MAX; trIDX++) {

TR = document.createElement('TR');

Space = Math.abs(trIDX - parseInt(radius));

for (tdIDX=0; tdIDX < MAX; tdIDX++) {

TD = document.createElement('TD');

styleWidth = '1px'; styleHeight = '1px';

if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;

else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;

else if (radius > 2) {

if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';

if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';

}

if (styleWidth != null) TD.style.width = styleWidth;

if (styleHeight != null) TD.style.height = styleHeight;

if (Space == tdIDX || Space == MAX - tdIDX - 1)

TD.style.backgroundColor = bdcolor;

else if (tdIDX > Space && Space < MAX - tdIDX - 1)

TD.style.backgroundColor = bgcolor;

if (Space == 0 && tdIDX == radius) TD.appendChild(obj);

TR.appendChild(TD);

}

TBody.appendChild(TR);

}

/*

}}

*/

Table.appendChild(TBody);

// insert table and remove original table

Parent.insertBefore(Table, objTmp);

}

</script>


</head>


<body background="/images/back.png">

<div id="container"><!--블로그 전체 몸통을 감싸는 레이어입니다.-->

  <div id="header"><img src="images/title.png" alt="title" width="1004 height="300" border="0" usemap="#map" />

    <map name="map" id="map">

    <area shape="rect" coords="625,70,757,104" href="http://philstay.codex.kr/xe/freeboard" target="_parent" onfocus='this.blur()' />

      <area shape="rect" coords="0,0,358,64" href="http://philstay.codex.kr/xe/outpage" target="_parent" onfocus='this.blur()' />

      <area shape="rect" coords="186,70,318,104" href="/program/camp.html" target="_parent" onfocus='this.blur()' />

      <area shape="rect" coords="43,70,175,104" href="int/int.html" target="_parent" onfocus='this.blur()' />

  </map></div>

  <div id="content">

    <p></p>

    <table id="ta" width="990px" height="306" border="0" radius="3" rborder="#999999" rbgcolor="#ffffff" align="center">

      <tr>

        <td width="447px" height="20" align="center" style="background:#f6f6f6; font-size:12px;"><b>최근 게시물</b></td>

        <td width="10px">&nbsp;</td>

        <td colspan="2" width="515px" align="center" style="background:#f6f6f6; font-size: 12px;"><b>저희 Mabilis 홈스테이는...</b>

        </td>

          </tr>

      <tr>

        <td align="left" witdh="447px" style="padding-left:10px; padding-right:10px"><span style="border-top-width:1; border-right-width:1; border-bottom-width:1; border-top-style:dotted; border-right-style:none; border-bottom-style:dotted;"><img class="zbxe_widget_output" widget="newest_document" skin="default" colorset="normal" order_target="list_order" order_type="desc" list_count="8" duration_new="24" subject_cut_size="30" display_regdate="Y" module_srls="120" /></td>

        <td width="10px">&nbsp;</td>

        <td width="269px" style="background:#FFFFFF; padding-left:10px; padding-right:10px"><p>저희 홈스테이는 BlaBla</p>

          <p>동해물과 백두산이 마르고 닳도록</p>

          <p>하느님이 보우하사 우리나라 만세</p>

          <p>무궁화 삼천리 화려강산</p>

        <p>대한사람 대한으로 길이 보전하세</p></td>

        <td width="246px" align="center" ><img src="http://philstay.codex.kr/images/scuba.jpg" width="225" height="291" /></td>

      </tr>

    </table>

    <script>roundTable("ta");</script>

    <p>&nbsp;</p>

    <table id="ta2" width="990" border="0" radius="3" rborder="#999999" align="center">

      <tr>

        <td height="20" align="center" style="background:#f6f6f6; font-size: 11px;"><b>최근 이미지</b></td>

      </tr>

      <tr>

        <td><span style="border-top-width:1; border-bottom-width:1; border-top-style:dotted; border-bottom-style:dotted;"><img class="zbxe_widget_output" widget="newest_images" skin="default" colorset="normal" title_length="6" thumbnail_type="ratio" thumbnail_width="60" thumbnail_height="60" cols_list_count="6" display_author="Y" display_regdate="Y" display_readed_count="N" display_voted_count="N" module_srls="167" /></span></td>

      </tr>

    </table>

    <script>roundTable("ta2");</script>

  </div>

  <img src="/images/index.png" />

  <div id="footer">

    <p>여기에 연락처</p>

  </div>

</div>

</body>

</html>


글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
주걱턱 테이블 가운데 정렬 [1] 2009.10.06 by 이동화309
reform 홈페이지 비번은 어디서 변경하나요? [1] 2009.10.06 by 백성찬
박노열 긴급 : 1,2,4 업데이트 후 문제발생 [1] file 2009.10.06 by 백성찬
불패의초인 인증 메일 재전송 버튼  
김동훈996 글이 안써져요 도와주세요. [2] file 2009.10.06 by 김동훈996
조승일159 xe 폴더 이름 변경 [1] 2009.10.06 by 백성찬
제이빅 첨부파일을 다운받을시 글쓴이에게 포인트 지급  
cabnb XeBanner 광고 4번이 안나옵니다..  
나쁜산타 XE 다운로드 질문!! - xe_full.1.2.4 [1] 2009.10.06 by 백성찬
청개굴이 php는 서버용 언어인가요..? [1] 2009.10.06 by xe훌륭해
나쁜산타 XE 다운로드 질문!! - 홈피주소 [1] 2009.10.06 by 백성찬
규니939 백업데이터 xml파일 수정은 어떻게 하나요?  
미령전설 다음이나 네이버에서 css파일을 쓰지않는 이유? [1] 2009.10.06 by yeum
lattente radio 버튼 값에 따라 각각 다른 filter 적용  
나쁜산타 XE 다운로드 질문!! [1] file 2009.10.06 by 백성찬
조승일159 친구등록을 하려 해도 어떻게 해야 하는지를.. [1] 2009.10.06 by 백성찬
komzi xe공식사이트에 사용한 최근게시글 출력스킨.. [2] file 2009.10.06 by komzi
이카쿤 게시판이나 페이지가 여는 중..에서 멈춥니다. [1] 2009.10.06 by 휘즈
김준영131 xe/files/cache에 있는 것 지워도 되나요? [1] 2009.10.06 by 백성찬
띵야 레이아웃을 적용 중일때 게시판만 빼 내는 방법 질문입니다. [1] file 2011.11.03 by ss1
하여가 게시판에서 새글의 아이콘 지속시간을 연장하는 방법이 궁금해요 [1] 2009.10.06 by DuRi
이정혁466 썸네일관련 고수분은 xe에 존재하지않는건가요 아직? [2] 2009.10.06 by 임마누엘 시카고
쌈꾼 기존 제로4의 에디터나 다른 에디터도 추가되었으면 정말 좋을것같습니다.  
아고라 외부페이지 업로드해도 반영되지 않네요. [2] 2009.10.06 by 불패의초인
세라오빠 ideation 레이아웃에 대한 질문입니다. [3] file 2009.10.06 by 김혜진320
정재민 아이프레임 쓰지않고 테이블안에 html 파일 불러오기.. [1] 2015.06.23 by 123
그냥뛰어 이런것도 가능할련지요?  
타이순 페이지에 이미지큰거 하나 추가하려고 하는데 그게 안되네요 [1] 2009.10.06 by yeum
통키지 2달 가까이 고생하다 질문드립니다 [1] file 2009.10.06 by Gekkou
서피현 로그인 풀림 현상 [1] 2009.10.06 by 불패의초인