SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    733
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to connect FBML and external css?

    If you know about FBML than you probably can help me.

    I've been attempting to create an FB page and I've added some FBML,
    but now I'm trying to link an external css to it.

    I've googled and read about it, but when I make a change on the css style sheet, the change doesn't seem to appear (in IE8) on the FB page.

    So my question is, which is correct:

    Code:
    <link ref="stylesheet" type="text/css" href="http://www.awebsite.com/css/main.css" />
    or
    Code:
    <link ref="stylesheet" type="text/css" href="http://awebsite.com/css/main.css" />
    or

    Code:
    <link href="http://www.awebsite.com/css/main.css" rel="stylesheet" type="text/css" />
    or

    Code:
    <link href="http://awebsite.com/css/main.css" rel="stylesheet" type="text/css" />
    or do I have a cache issue, or an IE8 issue?

    I put the url in the browser, to test that. I had the right url path, so I know that's correct.

    Is FBML the best way to create an FB page? Or is there a better/easier way?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,105
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    The last two links look fine, so the cache issue sounds more likely. Certainly worth ruling out.

    rel="stylesheet" is the way to go.

    Whether you use www in your urls or not is up to you, but it's best to decide to use one or the other always. Choose one, then rule out the other via .htaccess. Otherwise search engines will treat them as separate and divide ranking between them. (See half way down this page: http://www.sitepoint.com/forums/showthread.php?t=670928)
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    733
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply.

    If it's a cache issue, as you suggested it might be "cache issue sounds more likely",

    What's the solution?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,105
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Hmm, the obvious answer would be 'empty it', but are you asking about what to do on an ongoing basis? Are you sure it's a problem on an ongoing basis? I'm sure I've emptied the IE cache before, but I rarely use it so have to Google how to do it every time. (I'm normally on a Mac.)
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having a similar problem. It sounds like facebook is caching your css file.

    Just link the external css as you normally would on a web page.
    At the end of the path write ?v=10.0

    Each time you change the css you also change the 'version number' and force facebook to reload your css.

    Eg.

    <link href="http://www.yoursite.co.nz/style.css?v=10.1" rel="stylesheet" type="text/css" />


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •