2014-09-16 3 views
0

어떻게이 페이지를 가운데에 배치합니까? 나는 멍청이야. 감사!이 페이지를 중앙에 놓으려면 어떻게합니까?

<html> 
 
<head> 
 
<title>Tech Time Out Pledge</title> 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
 
<!-- Save for Web Styles (ttofb.psd) --> 
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> 
 
<script type="text/javascript"> 
 
       function loadConversionPixel(){ 
 
       $('#ho-pixels').append('<iframe src="http://strk.gnlinks.com/SLv3" scrolling="no" frameborder="0" width="1" height="1" onload=”changeLocation();”></iframe>'); 
 
\t \t } 
 
</script> 
 

 
<script> 
 
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
 
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 
 

 
    ga('create', 'UA-54408410-1', 'auto'); 
 
    ga('send', 'pageview'); 
 

 
</script> 
 
<style type="text/css"> 
 
<!-- 
 

 
#Table_01 { 
 
\t position:absolute; 
 
\t left:0px; 
 
\t top:0px; 
 
\t width:900px; 
 
\t height:1000px; 
 
} 
 

 
#ttofb-01 { 
 
\t position:absolute; 
 
\t left:0px; 
 
\t top:0px; 
 
\t width:900px; 
 
\t height:139px; 
 
} 
 

 
#ttofb-02 { 
 
\t position:absolute; 
 
\t left:0px; 
 
\t top:139px; 
 
\t width:318px; 
 
\t height:744px; 
 
} 
 

 
#ttofb-03 { 
 
\t position:absolute; 
 
\t left:318px; 
 
\t top:139px; 
 
\t width:65px; 
 
\t height:73px; 
 
} 
 

 
#ttofb-04 { 
 
\t position:absolute; 
 
\t left:383px; 
 
\t top:139px; 
 
\t width:149px; 
 
\t height:861px; 
 
} 
 

 
#ttofb-05 { 
 
\t position:absolute; 
 
\t left:532px; 
 
\t top:139px; 
 
\t width:303px; 
 
\t height:48px; 
 
} 
 

 
#ttofb-06 { 
 
\t position:absolute; 
 
\t left:835px; 
 
\t top:139px; 
 
\t width:65px; 
 
\t height:861px; 
 
} 
 

 
#ttofb-07 { 
 
\t position:absolute; 
 
\t left:532px; 
 
\t top:187px; 
 
\t width:303px; 
 
\t height:440px; 
 
} 
 

 
#ttofb-08 { 
 
\t position:absolute; 
 
\t left:318px; 
 
\t top:212px; 
 
\t width:65px; 
 
\t height:671px; 
 
} 
 

 
#ttofb-09 { 
 
\t position:absolute; 
 
\t left:532px; 
 
\t top:627px; 
 
\t width:121px; 
 
\t height:259px; 
 
} 
 

 
#ttofb-10 { 
 
\t position:absolute; 
 
\t left:653px; 
 
\t top:627px; 
 
\t width:107px; 
 
\t height:43px; 
 
} 
 

 
#ttofb-11 { 
 
\t position:absolute; 
 
\t left:760px; 
 
\t top:627px; 
 
\t width:75px; 
 
\t height:259px; 
 
} 
 

 
#ttofb-12 { 
 
\t position:absolute; 
 
\t left:653px; 
 
\t top:670px; 
 
\t width:107px; 
 
\t height:216px; 
 
} 
 

 
#ttofb-13 { 
 
\t position:absolute; 
 
\t left:0px; 
 
\t top:883px; 
 
\t width:58px; 
 
\t height:117px; 
 
} 
 

 
#ttofb-14 { 
 
\t position:absolute; 
 
\t left:58px; 
 
\t top:883px; 
 
\t width:287px; 
 
\t height:37px; 
 
} 
 

 
#ttofb-15 { 
 
\t position:absolute; 
 
\t left:345px; 
 
\t top:883px; 
 
\t width:38px; 
 
\t height:117px; 
 
} 
 

 
#ttofb-16 { 
 
\t position:absolute; 
 
\t left:532px; 
 
\t top:886px; 
 
\t width:34px; 
 
\t height:114px; 
 
} 
 

 
#ttofb-17 { 
 
\t position:absolute; 
 
\t left:566px; 
 
\t top:886px; 
 
\t width:262px; 
 
\t height:36px; 
 
} 
 

 
#ttofb-18 { 
 
\t position:absolute; 
 
\t left:828px; 
 
\t top:886px; 
 
\t width:7px; 
 
\t height:114px; 
 
} 
 

 
#ttofb-19 { 
 
\t position:absolute; 
 
\t left:58px; 
 
\t top:920px; 
 
\t width:287px; 
 
\t height:80px; 
 
} 
 

 
#ttofb-20 { 
 
\t position:absolute; 
 
\t left:566px; 
 
\t top:922px; 
 
\t width:262px; 
 
\t height:78px; 
 
} 
 

 
--> 
 
</style> 
 
<!-- End Save for Web Styles --> 
 
</head> 
 
<body style="background-color:#FFFFFF; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;"> 
 
<!-- Save for Web Slices (ttofb.psd) --> 
 
<div id="Table_01"> 
 
\t <div id="ttofb-01"> 
 
\t \t <img src="images/ttofb_01.gif" width="900" height="139" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-02"> 
 
\t \t <img src="images/ttofb_02.gif" width="318" height="744" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-03"><fb:like href="https://www.facebook.com/techtimeout" send="false" layout="box_count" show_faces="false" font=""></fb:like> 
 
<div id="fb-root"></div> 
 
<script type="text/javascript"> 
 
<!-- 
 
\t //facebook code 
 
\t window.fbAsyncInit = function() { 
 
\t \t FB.init({appId: '116284395201493', status: true, cookie: true, xfbml: true}); 
 
\t \t FB.Event.subscribe('edge.create', function(href, widget) { 
 
\t \t \t // Do something, e.g. track the click on the "Like" button here 
 
\t \t \t loadConversionPixel(); 
 
\t \t \t // push click to Google Analytics 
 
\t \t \t _gaq.push(['_trackEvent', 'Social', 'Clicked', 'Facebook']); 
 
\t \t }); 
 
\t }; 
 
\t (function() { 
 
\t \t var e = document.createElement('script'); 
 
\t \t e.type = 'text/javascript'; 
 
\t \t e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; 
 
\t \t e.async = true; 
 
\t \t document.getElementById('fb-root').appendChild(e); 
 
\t }()); 
 
//--> 
 
</script></div> 
 
\t <div id="ttofb-04"> 
 
\t \t <img src="images/ttofb_04.gif" width="149" height="861" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-05"> <a href="https://www.facebook.com/TechTimeOut/app_164858677009603"><img src="images/ttofb_05.gif" width="303" height="48" alt="" /></a> 
 
\t </div> 
 
\t <div id="ttofb-06"> 
 
\t \t <img src="images/ttofb_06.gif" width="65" height="861" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-07"> 
 
\t \t <img src="images/ttofb_07.gif" width="303" height="440" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-08"> 
 
\t \t <img src="images/ttofb_08.gif" width="65" height="671" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-09"> <a href="http://techtimeout.com/technology-ruining-family-vacation/"><img src="images/ttofb_09.gif" width="121" height="259" alt="" /></a> 
 
\t </div> 
 
\t <div id="ttofb-10"> <a href="http://www.facebook.com/TechTimeOut"><img src="images/ttofb_10.gif" width="107" height="43" alt="" /></a> 
 
\t </div> 
 
\t <div id="ttofb-11"> 
 
\t \t <img src="images/ttofb_11.gif" width="75" height="259" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-12"> <a href="http://techtimeout.com/technology-ruining-family-vacation/"><img src="images/ttofb_12.gif" width="107" height="216" alt="" /></a> 
 
\t </div> 
 
\t <div id="ttofb-13"> 
 
\t \t <img src="images/ttofb_13.gif" width="58" height="117" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-14"> <a href="http://www.facebook.com/TechTimeOut"><img src="images/ttofb_14.gif" width="287" height="37" alt="" /></a> 
 
\t </div> 
 
\t <div id="ttofb-15"> 
 
\t \t <img src="images/ttofb_15.gif" width="38" height="117" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-16"> 
 
\t \t <img src="images/ttofb_16.gif" width="34" height="114" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-17"> 
 
\t \t <img src="images/ttofb_17.gif" width="262" height="36" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-18"> 
 
\t \t <img src="images/ttofb_18.gif" width="7" height="114" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-19"> 
 
\t \t <img src="images/ttofb_19.gif" width="287" height="80" alt="" /> 
 
\t </div> 
 
\t <div id="ttofb-20"> 
 
\t \t <img src="images/ttofb_20.gif" width="262" height="78" alt="" /> 
 
\t </div> 
 
</div> 
 
<!-- End Save for Web Slices --> 
 
<div id="ho-pixels"></div> 
 
</body> 
 
</html>

(사실이 게시 얻을 말할 수있는 그 밖의 무엇? 내 게시물 대부분이 코드 것 같습니다. 그게 내가 도움이 필요 무엇 때문 사실이다.이 충분한 세부 사항입니다 내 질문을 게시 하시겠습니까? 예!)

+0

당신이 할 수 있었던 것은 당신이 시도한 것을, 당신이 가진 것과 당신을 만족시키지 않는 이유를 설명하는 것입니다. 또한, 꽤 일반적인 질문 - 검색이나 stackoverflow에 대한 검색은 많은 답변을 제공해야합니다. – mechalynx

+0

안녕하세요 아이비, 나는 인터넷 검색을 시도하고 stackoverflow에 대한 답변을 검색하고 여러 가지 센터링 답변을 시도했지만 그것을 작동시키지 못했습니다. 이 코드는 업로드하기 위해 나에게 주어졌다. – JDeezo

+0

ok로 검색했지만 검색 한 내용과 그 이유가 무엇인지 잘 모릅니다. 검색을 수행 한 경우 질문에 언급하십시오. 동일한 답변을 반복하지 않아도됩니다. – mechalynx

답변

2

#Table_01의 스타일을 다음과 같이 변경하십시오.

#Table_01 { 
    position:relative; 
    margin: 0 auto; 
    width:900px; 
    height:1000px; /* delete this line if you don't want a fixed height */ 
} 

margin 속성 요소는 페이지의 중앙에 나타난다 수단 좌우 용 상하 가장자리 및 auto 대한 0 픽셀로 설정된다.

희망이 도움이됩니다.