2011-07-14 131 views
-1

我正在某個網站上嘗試一個facebook按鈕。我嘗試在頁面的某個部分使用div位置,並在瀏覽器調整大小時與佈局一起移動,但不起作用。該按鈕停留在頁面的左上角。如何在網站上定位Facebook「like」按鈕

我該如何移動它?

這裏是代碼的部分,並且其中放置我在div

<script src="http://connect.facebook.net/en_US/all.js#appId=133207363431387&amp;xfbml=1"></script><fb:like href="http://notchtheguru.com" send="true" layout="box_count" width="450" show_faces="true" colorscheme="dark" font="arial"></fb:like> 
</head> 
<style type="text/css"> 
body { 
    background-image: url(images/NotchTheGuru_bg.jpg); 
    background-position: center; 
    background-color: #000000; 
    background-repeat: no-repeat; 
    background-position: top center; 
} 

#bodyContent { 
    position: relative; 

} 

#fbdiv { 
    position: relative; 
    left: 1017px; 
    top: 30px; 
    width: 200px; 
    height: 100px; 
} 



</style> 
<body> 

<div id="fbdiv"><div id="fb-root"></div></div> 
<center> 
<div id="bodyContent"> 

回答

0

我計算出來。簡單的修復。

我把div放在body中,但實際上並沒有在div中包含「fb:like」代碼。

我總是花時間在愚蠢的東西,我應該從一開始smh實現。

感謝您的答案。