简体   繁体   中英

Facebook Connect Dilemma on ie7 / ie8

It seems that I have to choose between having my facebook connect button appear in ie7 / 8, on the one hand, and having proper element positioning on the other.

If I begin my document with

<!doctype html xmlns:fb="http://www.facebook.com/2008/fbml">

all is well as far as page display and element positioning. However, to get the fb login button to display I need remove the "!doctype", and, if I do that, the page display positioning and layout gets screwed up.

How can I display the fb button without writing special CSS for ie7 / ie8

Additional Relevant Info:

The actual button code is:

 <fb:login-button>Connect</fb:login-button>

Before the close my body tag I have:

<div id="fb-root"></div>
<script src="https://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({ 
    appId:'<?php echo Configure::read('facebook.fb_api_key'); ?>',
    cookie:true, 
    status:true,
    xfbml:true
});
FB.Event.subscribe('auth.login', function(response) {
    window.location.reload();
});

Just do it like this:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM