Facebook as box flow height

How to control the height of the streaming part only in facebook, for example in the field . Its normal to reduce the height of the entire box, but if it tries to control it, images are not displayed.

css .fan_box .page_stream{ ...,width:300px}to.fan_box .page_stream{...,width:150px}

I ask because stream field inside iframe

+5
source share
7 answers

Unable to change height. Facebook does not provide a way to change the height, and there is no way to change the height using JavaScript and CSS.

Why can't I do this with JavaScript and CSS?

CSS iFrame, , iFrame - CSS.

Javascript iFrame, URL- iFrame , iFrame. :

document.getElementById('iframeID').contentWindow.document

Chrome.

Unsafe JavaScript attempt to access frame with URL... Domains, protocols and ports must match.

XSS. .

+4

Like Box , , " ":

data-height="250"

. :

http://www.skonet.com/Resources/Articles/Index.aspx

+1

div, , z-, :

<div style="position:absolute;z-index:2;top:0;left:0;width:300px;height:130px;background-color:#c0c;opacity:0.5;filter:alpha(opacity=50);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";"></div>
<div style="height:140px;width:140px;overflow:hidden;background-color:#0c0; margin-top: 60px;color: #fff;padding: 30px;font-family:arial;">
    facebook like box goes here - only the green part will be visible if you make the pink box white and take out the 0.5 opacity and the bottom will get cut off so you can just display whatever part you want
</div>
+1

, , , , , , , box, facebook.

, , ..

div

<div class="up1">
facbook like box 1 code
<div class="up2">
facbook like box 2 code

css

up1

.up1 {
position:absolute;
z-index:99999;
background-color:white;
}

up2

.up2 {
    padding-top:87px;
    }

, 1 2, facebook, bla bla, , , .

0

, . Facebook , .

, -. 1000 , , . 300px , .

. :

<div class="fb-like-box" data-href="https://www.facebook.com/MadeinHeavenEvents" data-width="800" data-height="2000" data-colorscheme="light" data-show-faces="false" data-header="false" data-stream="true" data-show-border="true"></div>

, - , , -, . :

<div class="fb-like-box" data-href="https://www.facebook.com/MadeinHeavenEvents" data-width="800" data-height="500" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>

SDK .

, , ,

0

250 , iframe

1000 - ​​- 300 ,

because the inner div inside the iframe is hardcoded to 300px and you cannot control this because it is in the cross domain of the iframe ...

0
source
<div class="fb-like-box" data-href="http://www.facebook.com/example" data-width="292" data-height="250" data-show-faces="true" data-stream="false" data-header="false"></div>

Set heightin this code what works best for you.

-1
source

All Articles