Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Like Widget on Fan page, Comment area out of visible area

Tags:

When using the like or send widget on a Fan Page (no mater if you use iframe tag or fbml for it) the overlay for commenting is positioned always to the right. see http://twitpic.com/4q7ggi for example.

I cant find a way to get the widget to respect the 520px boundary of the facebook tab. see http://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_101150316644842 for an example. Anyone an idea how to solve this ?

TIA Rufinus

like image 413
Rufinus Avatar asked Apr 27 '11 17:04

Rufinus


2 Answers

Try adding this to your css:

.fb_edge_comment_widget {
    margin-left: -350px;
}

This will move comment box to the left, but the little arrow pointing to the button will move too (which you could try to cover with another element). It will only work if you're using XFBML, not an iframe.

Here's an example.

like image 65
seler Avatar answered Sep 22 '22 18:09

seler


I had to move the little arrow to the bottom, and that's how i did it.

1) Move your popup window to the desired position. Use the !important statement to overwrite default styles.

.fb_edge_comment_widget {
    top: -224px !important; left: -246px !important; height: 191px;
    background: url(../img/arrow-down.gif) 0 100% no-repeat
}

This style also contains a new arrow image which replaces the bottom line of the popup window. It contains my own new bottom arrow, which is blue (#283E6C) by default and grey inside (#F2F2F2). We can use height to adjust the vertical position and move the background image to the bottom.

The image will look like this: Image overlay for facebook like button popup.

2) Apply overflow: hidden to the span that wraps the iframe, We'll be able to cut off parts of the iframe by applying margin-top in step 3, and replace them with our own.

.fb_edge_comment_widget > span {
    height: 184px !important; overflow: hidden; border-top: 1px solid #000;
}

I'm using border-top to create my own upper border, since in step 3 we are cutting of the default border and arrow.

3) Move the iframe up a bit to cut off its upper border and arrow.

    .fb_edge_comment_widget > span > iframe {
        margin-top: -7px;
    }   

The result looks like this in my case:

enter image description here

like image 31
Marcel Kalveram Avatar answered Sep 22 '22 18:09

Marcel Kalveram