图像和边框之间的填充

发布于 2024-12-02 10:33:33 字数 2885 浏览 3 评论 0原文

我正在开发一个facebook 粉丝专页。我所使用的主图像与页面边框之间的空间存在问题。我只想显示图像并占据粉丝页面上的所有空间。 这是我的代码,

<!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>Nikah4Life</title>
<script type="text/javascript">window.fbAsyncInit = function() {FB.Canvas.setSize();}// Do things that will sometimes call sizeChangeCallback()function sizeChangeCallback() {FB.Canvas.setSize();}</script>
</head>

<body>
<div style="text-align:center; width:532px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_8201108311953149" src="sponsors.jpg" usemap="#Image-Maps_8201108311953149" border="0" width="400" height="700" alt="" />
<map id="_Image-Maps_8201108311953149" name="Image-Maps_8201108311953149">
<area shape="rect" coords="53,6,356,33" href="http://www.nikah4life.com/" target="_blank" alt="" title=""    />
<area shape="rect" coords="146,650,259,691" href="http://www.nikah4life.com/" target="_blank" alt="" title=""    />
<area shape="rect" coords="59,269,123,303" href="http://twitter.com/#!/Nikah4Life" target="_blank" alt="" title=""    />
<area shape="rect" coords="165,269,236,303" href="http://www.youtube.com/nikah4life"  target="_blank" alt="" title=""    />
<area shape="rect" coords="268,269,349,303" href="http://www.nikah4life.com/contact.php" target="_blank" alt="" title=""    />
<area shape="rect" coords="8,328,179,397" href="http://harunyahya.co.uk/"  target="_blank" alt="" title=""    />
<area shape="rect" coords="134,396,291,461" href="http://www.linksdisti.com/"  target="_blank" alt="" title=""    />
<area shape="rect" coords="222,324,395,399" href="http://www.zainbhikha.com/index.htm" alt=""  target="_blank" title=""    />
<area shape="rect" coords="245,488,387,625" href="http://www.youtube.com/nikah4life" alt="" target="_blank" title=""    />
<area shape="rect" coords="361,426,395,459" href="http://www.technology-arena.com/" alt="" title=""    />
<area shape="rect" coords="8,426,40,459" href="http://www.technology-arena.com/" alt="" title=""    />
</map>
</div>
         <div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
 appId  : 'your APP ID Goes Here',
 status : true, // check login status
 cookie : true, // enable cookies to allow the server to access the session
 xfbml  : true// parse XFBML
 });

 FB.Canvas.setAutoResize(7);

 </script>   
</body>
</html>

编辑: 将对齐方式从中间更改为左侧使其起作用。感谢您的回答。

I am developing a facebook fanpage. I am having problem with the space between the main image that I am using and the border of the page. I just want the image to appear and take all of the space on the fanpage.
Here is my code,

<!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>Nikah4Life</title>
<script type="text/javascript">window.fbAsyncInit = function() {FB.Canvas.setSize();}// Do things that will sometimes call sizeChangeCallback()function sizeChangeCallback() {FB.Canvas.setSize();}</script>
</head>

<body>
<div style="text-align:center; width:532px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_8201108311953149" src="sponsors.jpg" usemap="#Image-Maps_8201108311953149" border="0" width="400" height="700" alt="" />
<map id="_Image-Maps_8201108311953149" name="Image-Maps_8201108311953149">
<area shape="rect" coords="53,6,356,33" href="http://www.nikah4life.com/" target="_blank" alt="" title=""    />
<area shape="rect" coords="146,650,259,691" href="http://www.nikah4life.com/" target="_blank" alt="" title=""    />
<area shape="rect" coords="59,269,123,303" href="http://twitter.com/#!/Nikah4Life" target="_blank" alt="" title=""    />
<area shape="rect" coords="165,269,236,303" href="http://www.youtube.com/nikah4life"  target="_blank" alt="" title=""    />
<area shape="rect" coords="268,269,349,303" href="http://www.nikah4life.com/contact.php" target="_blank" alt="" title=""    />
<area shape="rect" coords="8,328,179,397" href="http://harunyahya.co.uk/"  target="_blank" alt="" title=""    />
<area shape="rect" coords="134,396,291,461" href="http://www.linksdisti.com/"  target="_blank" alt="" title=""    />
<area shape="rect" coords="222,324,395,399" href="http://www.zainbhikha.com/index.htm" alt=""  target="_blank" title=""    />
<area shape="rect" coords="245,488,387,625" href="http://www.youtube.com/nikah4life" alt="" target="_blank" title=""    />
<area shape="rect" coords="361,426,395,459" href="http://www.technology-arena.com/" alt="" title=""    />
<area shape="rect" coords="8,426,40,459" href="http://www.technology-arena.com/" alt="" title=""    />
</map>
</div>
         <div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
 appId  : 'your APP ID Goes Here',
 status : true, // check login status
 cookie : true, // enable cookies to allow the server to access the session
 xfbml  : true// parse XFBML
 });

 FB.Canvas.setAutoResize(7);

 </script>   
</body>
</html>

EDIT:
Changing the alignment from middle to left made it work. Thanks for the answers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我只土不豪 2024-12-09 10:33:33

页面的画布应该有一个边框。我不认为它可以被删除。

The canvas for Pages is supposed to have a border on it. I don't think it can be removed.

仅一夜美梦 2024-12-09 10:33:33

在你的CSS中使用这段代码

正文{
宽度:520px;
保证金:0;
填充:0;
边框:0;
溢出:隐藏;
}

use this code in your css

body {
width:520px;
margin:0;
padding:0;
border:0;
overflow:hidden;
}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文