Normally, you just set up and copy the Facebook Likebox code into your website
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&width=292&colorscheme=light&show_faces=true&stream=false&header=true&height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
If you do so, the XHTM validator will give you the following error:
there is no attribute " allowTransparency "
However, IE needs allowTransparency = "true" to work, you can work this around by modifying the Facebook Likebox with if statement for IE as follow:
<!--[if IE]
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&width=292&colorscheme=light&show_faces=true&stream=false&header=true&height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
<![endif]--> <!--[if !IE]>-->
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&width=292&colorscheme=light&show_faces=true&stream=false&header=true&height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;"></iframe>
<!--<![endif]-->
Or, you can also use the following code
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&width=292&colorscheme=light&show_faces=true&stream=false&header=true&height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" <!--[if ie]> allowTransparency="true" <![end if]-->
></iframe>
Now you have a valid XHTML Facebook Likebox code.
0 comments:
Why not leave a comment? No matter what, I'd love to hear from you!
Post a Comment