GetSimple Support Forum

Full Version: Facebook widget breaks css in sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the awesome Grill theme and I added the facebook widget code in the sidebar thru a component and when you are not logged into FB the css breaks.

[Image: mTQj0rY.png]

FB component:
<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); = id;
  js.src = "//";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like-box" data-href="" data-colorscheme="light" data-show-faces="true" data-header="false" data-stream="false" data-show-border="false"></div>

<div class="advertisement">
    <h4>Volg ons op Facebook</h4>
          <?php get_component('facebook'); ?>

I've tried setting the width in the FB component like data-width="100%" & data-width="300" with no difference.

Any suggestions?
Does it use an iframe ?

If not you can maybe set the wrap settings in css
for whitespace and word break

or search google i am sure someone has a solution already
ok, I found some sort of solution but its more of a hack anyway:

<div id="likebox-wrapper"><?php get_component('facebook'); ?></div>

css file:
#likebox-wrapper * {
   width: 103% !important;

Why the 103% you ask? because somehow 100% broke the FB internal padding or spacing and it looked ugly:

[Image: QnmKjvQ.png]

[Image: q7jyg9F.png]

103% when not logged into FB:
[Image: rdNyK9T.png]

It'll have to do for now.