Caecilia V. Wernersen
Caecilia V. Wernersen

Reputation: 11

Like box image witdh

I added an iframe like box to a website: www.apf.no

But some of the images go out of proportions, how can I override this code?

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

Thanks Caecilia

Upvotes: 1

Views: 1067

Answers (2)

CyanPly
CyanPly

Reputation: 101

I finally got the images back to the correct width using the following code:

<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>

And the CSS is:

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

Please remember to add one to the .css?17 each time you update the CSS to prevent the use of a cached version of the CSS.

Upvotes: 1

pocketDev
pocketDev

Reputation: 205

You need to use the older, but still supported fan-box to be able to add your own custom stylesheet, then any styling you like is possible including overriding the "max-width"

See these posts for more details:

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/

Upvotes: 0

Related Questions