Nach stundenlangem Debuggen warum meine Like-Box von Facebook nicht im IE und FF angezeigt wird, habe ich endlich den Fehler in der CSS-Datei ausgemacht. Der Grund: Die fb-Like-Box ist bei mir in einem Tab untergebracht und dieses hat das Attribut "display: none;". Dieses Attribut hat zur Folge, dass die fb-Like-Box mit dem Wert height und width von je 0px angezeigt wird, also unsichtbar ist.
Auf der fb-Developer-Seite wird das auch erklärt und ein Lösungsvorschlag unterbreitet:
The reason that you don't get a like button is because the iframe get 0px height and 0px width. This is logically, because when you ask with Javascript height or width of a hidden element, you will get 0px. You can fix it by adding min-width and min-height in your css file..fb-like span, iframe.fb_ltr {.
min-width: 105px;
min-height: 20px;
}
How much pixels this must be depends on the language you use.
I hope this will help you.
Jetzt bekomme ich dies allerdings nicht umgesetzt.
Ich habe sowohl in der class="facebook-like" als auch in der class="fb-like" versucht mit style="min-width: 105px; min-height: 20px" eine Minimumgröße zu bestimmen, aber nichts ist passiert. Die Like-Box bleibt weiterhin unsichtbar.
Hat jemand einen Lösungsvorschlag? Danke schon mal.
Auf der fb-Developer-Seite wird das auch erklärt und ein Lösungsvorschlag unterbreitet:
The reason that you don't get a like button is because the iframe get 0px height and 0px width. This is logically, because when you ask with Javascript height or width of a hidden element, you will get 0px. You can fix it by adding min-width and min-height in your css file..fb-like span, iframe.fb_ltr {.
min-width: 105px;
min-height: 20px;
}
How much pixels this must be depends on the language you use.
I hope this will help you.
Jetzt bekomme ich dies allerdings nicht umgesetzt.
PHP:
<div class="facebook-like">
<div class="fb-like" data-href="http://www.meineseite.de/" data-send="false" data-layout="button_count" data-width="250" data-show-faces="false"></div>
</div>
Ich habe sowohl in der class="facebook-like" als auch in der class="fb-like" versucht mit style="min-width: 105px; min-height: 20px" eine Minimumgröße zu bestimmen, aber nichts ist passiert. Die Like-Box bleibt weiterhin unsichtbar.
Hat jemand einen Lösungsvorschlag? Danke schon mal.