In my post on adding the Facebook application Static FBML to your Fan Page, I laid out in detail how to use this very useful app to create very nice page layouts for your Wall tabs. As I’ve researched this further, I found that good ol’ Microsoft Internet Explorer versions 6, 7 and 8 do not handle these Static FBML pages like Firefox, Safari and the other browsers. Of course, any seasoned Web developer expects this and IE does not disappoint.
Static FBML CSS: Internet Explorer (all versions) and other browsers
With Internet Explorer you have only two options in applying CSS styles to your Static FBML application tab:
- Calling an external stylesheet using, for example:
<link href=”http://yoursite.com/styles/layout.css” rel=”stylesheet” type=”text/css” />
Of course, you need to upload the CSS file to your server (or some Web-accessible server). NOTE: Add this string to the end of your external stylesheet call to force Facebook to refresh the version it has cached (example): <link href=”http://yoursite.com/styles/layout.css?v=10.0” rel=”stylesheet” type=”text/css” /> (change the v= number each time you refresh the page.) - Putting the CSS styles inside the HTML mark-up, i.e. inlining the styles, for example:
<div style=”font-size:14px; margin:0 auto;”>
Although inlining the styles has appeared to always work with Static FBML application-tab pages, using calls to an external stylesheet seems to be only recently supported. I tested our HyperArts Static FBML Page, calling an external stylesheet, and it’s working fine. (If anyone does notice an issue, please let me know!)
The option that <em>doesn’t</em> work with Internet Explorer is using the style tag to embed your CSS rules:
<style type="text/css">
.some-class { margin:0; font-size:14px; }
#some-id { margin:0; font-size:14px; }
</style>
Although the above works in most other browsers, Internet Explorer ignores the contents of that tag.
If at all possible, you should choose the option to call an external stylesheet. You have much greater flexibility in applying — and making changes to — your CSS using a stand-alone stylesheet.


#1 by efoc - December 20th, 2009 at 19:08
I am using and test your facebook pages in IE 8, your tabs look not working in IE 8. I try to use external CSS but, however, all my browsers cannot show my css style.
What I do is paste my following code in “Edit FBML” page:
***********Begin***********
<a href=”#” rel=”nofollow”></a>
<a href=”#” rel=”nofollow”>Title</a>Blablablabla…
***********End************
I am using Fan Pages with FBML application added. Thanks.
#2 by efoc - December 20th, 2009 at 19:13
OK, I solve it already. The following is my way how to add my external CSS.
<link href=”http://yoursite.com/styles/layout.css” rel=”stylesheet” type=”text/css” media="screen"/>
Hope this help for other.
#3 by Daniel - December 21st, 2009 at 10:08
That’s all very well but in the Publisher context, your application isn’t allowed to have an external stylesheet, using the link tag, so, I’d like to know, how is one meant to make a publisher app for IE !?
#4 by Dan - December 21st, 2009 at 15:31
I’ve tried using an external style sheet and style tags, and facebook still won’t pick up my font sizes…everything else (borders, colors etc.) is working. What am I doing wrong?
#5 by admin - December 21st, 2009 at 16:54
Well, it’s hard to know what you’re doing wrong w/o seeing the stylesheet. But also be aware that Facebook caches your CSS and it’s hard to clear and get exactly what’s on the page. Sometimes you have to wait awhile. It’s very frustrating.
#6 by Joe Breaux - December 23rd, 2009 at 16:20
Hi Tim,
I’m a newbie and looking to create custom facebook tabs. I’m not a coder and would like to know what is the best (visual/design) software to create dynamic html/fmbl tabs..
Thank you,
Joe
#7 by admin - December 23rd, 2009 at 19:10
HTML can be done in a plain text editor. As for the details of using HTML markup, there are plenty of resources online for the newbie.
#8 by Jana - December 30th, 2009 at 11:33
Okay, this is really weird. I created my page on Firefox and discovered that it did not show correctly in IE 8, so I set about moving all the style info into internal as you suggested. I did not get finished before Christmas and returned today, and it is displaying correctly in IE 8 without making the changes. Did IE 8 make changes?
#9 by admin - December 30th, 2009 at 11:53
Sounds like it was a caching issue, which often happens because FB caches stylesheets and styles and rather tenaciously. If you go with an external stylesheet, make sure that at the end of the file name (mystyle.css, for example) you add this string: ?v=10.0. Look at the top of this post to see more about this.
#10 by Jeff - January 11th, 2010 at 12:05
We just experienced this issue of IE not seeing embedded style on 3 different instances of IE. I say “instances” because they are 3 different version of IE (6, 7, &
but the same versions on the majority of other computers see the embedded styles just fine. One version was on one of our account guys computer which was mirrored off another computer that has no issue (mind you, we’re not sure if this user altered their version since installation – we’re looking into it next time he’s onsite.)
Does anyone have any idea what might be causing a few instances of IE to not see it?
BTW, thank you for posting. We implemented your solution and now the CSS work on all instances of IE in our tab.
#11 by timware - January 11th, 2010 at 12:12
If the IE versions were also on identical Windows OS versions, then I’m not sure what the issue is. But it might be an OS issue. If you provide the OS and IE version and a URL I can tell you what I see. But I found that IE, any version, doesn’t like styles embedded with the <style></style> tags.
#12 by Ana - January 19th, 2010 at 07:49
I am using Static FBML for the first time. I read in a blog that I should only copy the code between the body tags. I did so, but nothing shows up after I click save changes.
What am I doing wrong?
FB_welcome
#13 by admin - January 19th, 2010 at 08:49
Without seeing the code, I have no idea why nothing is showing up. Hopefully, you’ve read my blog post/tutorial on FBML: http://bit.ly/6joFj
If you haven’t read it, you should.
#14 by Rick Clark - January 22nd, 2010 at 06:26
I read your articles and set up my FBML box with the following css stylesheet. Uploaded the css to my css folder and I still get nothing. Below is my link, any idea why it is not working?
#15 by timware - January 26th, 2010 at 09:10
You have to wrap your code in <code></code> for it to appear in a comment.
#16 by Fredrik - January 22nd, 2010 at 07:27
Hi. This is working very good with CSS. But how do I do to stop .swf to cache? I’m having problem with IE not displaying my .swf correctly after refreshing the site. I have to empty my TEMP folder everytime I refresh.
Thanks / Fredrik
#17 by timware - January 26th, 2010 at 09:12
Not sure what you can do about the swf caching issue. You might try adding the “?v=10″ bit to the end of the URL, after the .swf. I know that works with the .css file call, as it forces Facebook to load a fresh copy of the file. Let me know how it goes, here.
#18 by matthewfreyer - January 28th, 2010 at 01:00
I am having the tag problem with IE. I removed the tag and created an external stylesheet, now using the tag and I am still having trouble. The embedded CSS works great in Safari and Firefox. I just want it to look the same in IE. Help please.
#19 by timware - January 28th, 2010 at 09:09
Sorry to hear this, Matthew. I can’t provide support here for display issues with IE, the bane of coders everywhere! This post is about getting IE to just read the styles. Once they are rendering at all, the display issues are something else entirely. There is plenty of info online. I’d start by googling: internet explorer css bugs.
#20 by matthewfreyer - January 28th, 2010 at 09:58
Perhaps IE isn’t reading the style. I placed the
<link>tag for my external stylesheet above my html. Is this the correct placement.#21 by timware - January 28th, 2010 at 10:12
As it says in my Static FBML tutorial, *all* content for your page must be what would be between the <body></body> tags in an HTML file. There should be NO <html>, <head> or <body> tags in your Static FBML app. These are implemented by Facebook. Your content would be placed within Facebook’s <body> tags.
#22 by matthewfreyer - January 28th, 2010 at 12:31
I understand that, Tim. I have read your tutorial several times. If the
<link>tag is placed withing the<head>tag in normal html coding, and there is no<head>tags in the FBML app, where do you place the<link>tags? Let me be even clearer: Where did you place the<link>tags to call your external stylesheet for the HyperArts Static FBML Page?#23 by timware - January 28th, 2010 at 12:39
I put the <link> tag calling the external style sheet first, followed by the HTML markup & content.
#24 by matthewfreyer - January 28th, 2010 at 12:47
Thank you! I have done the same but unfortunately it is still not working. Thank you for your time.
#25 by Huw - February 9th, 2010 at 01:29
Hi,
From what I can see now – FBML is now fully functioning with css styles above the html markup. It seems to be working fine for me in IE7/8. Only since January.
Has facebook made any changes?
#26 by admin - February 26th, 2010 at 13:22
What about IE 6, Huw? That’s the 800-lb gorilla.
#27 by Huw - February 26th, 2010 at 16:47
IE6 – Looks ok for me using IETester?
#28 by Gabriel - February 23rd, 2010 at 15:58
Hi,
I have done but i have a problem with layout in opera browser. Facebook have made a change in a principal template. Can you help me. Thank you.
#29 by admin - February 28th, 2010 at 18:10
Sorry, Gabriel. I just don’t have the bandwidth to troubleshoot everyone’s cross-browser display issues. I’d google it.
#30 by joanne - February 26th, 2010 at 13:16
Just a note, straight up HTML didn’t work with my image mapping. It worked in an HTML test bed but not in static fbml. however i found a great tool that at least converted my image map into css: image-map.com. Worked like a charm!
#31 by Huw - February 26th, 2010 at 16:48
Hi,
What about Flash in static FBML? OK So it’s easy enough to embed but, what if I have clikable regions in my flash that link to webpages? Not working for me.
May try this image map idea! Keep you posted.