Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook like box stream height

How to control the facebook like box stream part height alone. Its normal to reduce height of whole box but if tries to control it fans images are not shown.

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

i'm asking because the stream box inside iframe

like image 333
ArK Avatar asked Aug 14 '10 12:08

ArK


People also ask

What is the aspect ratio for Facebook live?

Aspect ratio: 16:9. If your ratio is too far from 16:9, we may not be able to support your stream.


1 Answers

There isn't a way to change the height. Facebook doesn't provide a way to change the height and there isn't a way to change the height using JavaScript and CSS.

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

CSS just doesn't apply through an iFrame because thats how an iFrame works -- its basically a window to another page with its own CSS.

Javascript won't allow you to access the content of an iFrame if the URL of the iFrame is different than the page that contains the iFrame. Doing:

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

Will give you the following warning in Chrome.

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

The reason for this is to prevent XSS. Here's more on the Same Origin Policy.

like image 157
squinlan Avatar answered Sep 21 '22 15:09

squinlan