Take the 2-minute tour ×

I'm using the comments facebook social plugin When I embed it, the script created an iFrame that has the text "Facebook social plugin" with the facebook logo at the bottom (as seen in the image attached below).

I inspected the element using Firebug and tried to set its class to display:none; in my CSS file. However - that does not hide it (I suspect it's because it's in its own iFrame). How can I use CSS or jQuery (or any other method) to disable that text?


Facebook social plugin

share|improve this question
Maybe you can cover it with a carefully placed <div>. But I would read the terms of service to see if masking attribution is allowed. –  ide Feb 2 '11 at 2:10
add comment

8 Answers

up vote 6 down vote accepted

You're overcomplicating things. Small CSS change...

.fb_iframe_widget{overflow: hidden;}
.fb_ltr{margin-bottom: -20px;}


Sidenote - I agree with the warning about legal issues. You shouldn't really do this.

share|improve this answer
Thanks. I decided to just leave it in there to comply with FB's terms of use. –  yuval Feb 23 '11 at 16:56
add comment

You can only control the options given to you by the plugin developer (here, Facebook). Most plugin developers do not allow altering their code and Facebook is one of them. I suggest you stick to what Facebook provides you.

Have a read of the following:

  1. Brand Permissions Center
  2. Facebook Platform Policies
share|improve this answer
add comment

If it's a CSS issue for the iFrame then you can't do anything about it (eg: overide it). It is loading from another site so you don't have control over it.

share|improve this answer
unfortunate, but thank you. –  yuval Feb 2 '11 at 5:15
add comment

I ran into this issue as well. I fixed it by setting the height of the iframe using an inline style and set overflow to hidden.

Example: iframe is 185px. Add this inline:

style="overflow:hidden; height:160px;"

share|improve this answer
add comment

See the iframe example in the description of the .contents() method.

You can easily access the DIV (or whatever) and modify the CSS for it, or manipulate any other way.

share|improve this answer
Hi, this of course will only work if the content of the IFRAME is in the same domain as the main page, which in your case isn't true, so I'm afraid it shouldn't work. Sorry! I suspect IDE's approach of a carefully positioned DIV hiding the element is the only way. –  Neil Feb 2 '11 at 2:42
add comment
.fb_iframe_widget {overflow: hidden;}
div.fb-comments.fb_iframe_widget span {margin-bottom: -35px;}
share|improve this answer
add comment


.facebookOuter { width:248px; padding:10px 0px 10px 10px; height:230px; overflow:hidden; } .facebookInner { height:250px; width: 238px; overflow: hidden; }

And Like Box

<div class="facebookOuter"> <div class="facebookInner"> <div class="fb-like-box" data-width="250" data-height="300" data-href="http://www.facebook.com/myhumourbook" data-border-color="dodgerblue" data-show-faces="true" data-stream="false" show_border=false data-header="false"> </div> </div> </div> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>
share|improve this answer
add comment

If you play around with the box's dimensions, you can sort of make it disappear on it's own, and you haven't even technically broken their terms, because you haven't modified their code using your own hacks. =)


enter image description here

The dimensions on this one are 310x382. You can still see it poking it's head up, but essentially it's hidden enough that anyone just glancing over your page won't really notice it much. And since most surfers tend to speed read ...

share|improve this answer
add comment

Your Answer


