像盒子图像宽度

问题描述 投票:1回答:2

我在网站上添加了一个像iframe一样的盒子:www.apf.no

但是有些图像超出了比例,我该如何覆盖这些代码呢?

.connect_widget .page_stream img {     
   max-width: 120px; 
}

谢谢Caecilia

css facebook-social-plugins facebook-iframe
2个回答
1
投票

我终于使用以下代码将图像恢复到正确的宽度:

<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script> 
<script type="text/javascript">FB.init("");</script> 
<fb:fan profile_id="ID_OF_PAGE_HERE" stream="1" connections="20" width="600px" height="500px" header="1" logobar="0"  css="WEBSITE_URL_HERE/css/facebook.css?17"></fb:fan>

CSS是:

a.largePhoto img.img {
    max-width: 300px !important;
    width: 300px !important;
}

每次更新CSS时,请记得在.css?17中添加一个,以防止使用CSS的缓存版本。


0
投票

您需要使用较旧但仍然支持的风扇框才能添加自己的自定义样式表,然后您可以使用任何样式,包括覆盖“max-width”

有关详细信息,请参阅这些帖子

http://www.speckygeek.com/how-to-add-facebook-like-box-to-your-website/

http://www.daddydesign.com/wordpress/how-to-customize-your-facebook-fan-box/

© www.soinside.com 2019 - 2024. All rights reserved.