Conditional Stylesheets in FBML

June 20, 2010

FBML doesn’t allow the IE conditional stylesheet comments in Facebook Fan Pages.  In order get similar functionality, we need to leverage the significantly more powerful user-agent tags. This allows you to post user-agent conditional code to your fan page for any browser type.

#submit-container { margin-top: 15px; }
#agree-container { position: relative; top: 10px; }
#submit-button { padding: 9px 20px; border: 1px solid green; color: black; }

What isn’t clear in the FBML documentation at this point is how accurate the user-agent application is. If I’m spoofing my user-agent, does the effectiveness of this tag diminish? Most people don’t spoof their user agent, but there are people who do so. Presumably if the user agent is the only test, they wouldn’t be able to view your fan page.

Author

Stay in Touch!

Stay in Touch!
Solutions Architecture

browse through our blog articles

Blog Archive