Skip navigation
Currently Being Moderated

Centering an item

Apr 18, 2012 10:08 AM

I am having trouble centering something in my "Sublogo"

 

Here is the site:

http://www.humboldt.edu/cicd/index_test.htm

 

You can see the like button is way to far right. Any ideas?

 
Replies
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 18, 2012 10:43 AM   in reply to Overtim3

    I guess you're not using XFBML for Facebook Like code. You're using the iFrame version which is causing this issue.

     

    This will do the trick:

     

    Make the following change to your code in HTML and it should work:

    <div id="Sublogo" style="margin-left: -80px;">

    Try it out and let us know if it is sorted.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 18, 2012 11:14 AM   in reply to Overtim3

    iframe is a HTML script that is considered vintage - mostly because it is not fully cross-browser compatible.

    xfbml is Facebook's proprietary script that runs off Javascript and works just fine across all browsers.

     

     

     

    that somewhat worked. i guess i gatta keep playing with margins and the height.. But then it throws off my other div ..

    If it throws off your other divs, you could separate the DIV ids for your other content. Make an exclusive DIV only for the Facebook's like button and a separate div for other content following it. This should definitely work.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 18, 2012 11:16 AM   in reply to Overtim3

    This should help you too:

     

    There are two Like button implementations: XFBML and Iframe. The XFBML (also available in HTML5-compliant markup) version is more versatile, but requires use of the JavaScript SDK. The XFBML dynamically re-sizes its height according to whether there are profile pictures to display, gives you the ability (through the Javascript library) to listen for like events so that you know in real time when a user clicks the Like button, and it always gives the user the ability to add an optional comment to the like. If users do add a comment, the story published back to Facebook is given more prominence.

    ~Taken from http://developers.facebook.com/docs/reference/plugins/like/

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Apr 20, 2012 9:41 AM   in reply to Overtim3

    When you say 'it throws off other div', could you send us a screenshot of what it looks like? Because when I tried it here, it worked just fine.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points