什么推动这个Facebook小部件?

时间:2012-06-06 19:29:13

标签: css facebook wordpress widget

我疯了!我玩过一切!

这里是widget css

.fan_box a:hover{text-decoration: none;}
.fan_box .full_widget{height: 298px; border: 0 !important;background: none !important;position: relative;padding-left:10px !important;margin-left:0px !important;}
.fan_box .connect_top{background: none !important;padding: 0!important;}
.fan_box .name_block{color:#fff !important;}
.fan_box .connect_action{padding: 0 !important;overflow:hidden !important;color:#fff !important;}
.fan_box .connections{padding: 0 0 0 0px !important;border: 0 !important;font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #fafafa;margin-left:0px !important;}
span.total{color: #eee;font-weight: bold;}
.fan_box .connections .connections_grid {padding-top: 10px !important;}
.fan_box .connections_grid .grid_item{padding: 0 7px 10px 0 !important;}
.fan_box .connections_grid .grid_item .name{font-family: "lucida grande",tahoma,verdana,arial,sans-serif;font-weight: normal;color: #fff !important;padding-top: 1px !important;}
.fan_box .connect_widget{margin: 0 !important;}
.fan_box .connect_widget .connect_widget_interactive_area {margin: 0 !important;}
.fan_box .connect_widget td.connect_widget_vertical_center {padding: 0 !important;}
.fan_box .profileimage {padding-left:0px !important;}
.fan_box .connect_action .name{color:#fff !important;}

这是PHP

<div class="col-wrapper facebook">
    <h3 class="tab"><?php echo $title;?></h3>
        <div class="col">
            <div style="overflow:hidden; width:208px; height:265px;margin:0 auto;padding-left:10px;">
            <iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F<?php echo $profile_id;?>&amp;width=244&amp;colorscheme=light&amp;show_faces=true&amp;border_color=%23fff&amp;stream=false&amp;header=false&amp;height=272" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:244px; height:418px;margin:-8px auto 0 -20px!important;"  allowTransparency="true">
            </iframe>
        </div>
    </div>
</div>

非常感谢任何帮助。我被卡住了!

由于

1 个答案:

答案 0 :(得分:2)

使用Facebook iframe小部件非常糟糕,检查iframe上的内联样式,您会注意到:

width:244px; height:418px;

在iframe的网址中还定义了一个高度/宽度。

src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F<?php echo $profile_id;?>&amp;width=244&amp;colorscheme=light&amp;show_faces=true&amp;border_color=%23fff&amp;stream=false&amp;header=false&amp;height=272"

更改这些可能有所帮助。