INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Embedded Facebook status not calculated so masonry grid doesn't load correctly

Embedded Facebook status not calculated so masonry grid doesn't load correctly

Embedded Facebook status not calculated so masonry grid doesn't load correctly

(OP)
I'm using the X theme on Wordpress which allows me to display my blog page in a two-column masonry-style layout. Blog posts can be different types, one of which is 'status'. I am embedding a Facebook status but the problem is that the height is not defined so when the page loads, the height of the Facebook status is not calculated before the rest of the page loads, so the next blog post underneath lays half way over the Facebook status blog post.

Two examples from the blog page:





If you go to the page for the first time the chances are the Facebook status will be overlapped. If you then reduce the browser window and then maximise it, the correct Facebook height is calculated, but this is not a solution of course.

It's the standard div from Facebook pasted into the excerpt (makes no difference if pasted into the content area).

CODE -->

<div class="fb-post" data-href="https://www.facebook.com/followtheboat/photos/a.441724739204342.94818.140796312630521/972409826135828/?type=3" data-width="500"></div> 

Of course this falls outside the support of the X theme because this is a Facebook javascript issue but they did suggest:

Quote (X developer)

I think you can use the Facebook API to call a function right after it’s loaded and it should call $(window).trigger('resize');

... but that's beyond my ken. Any clues?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close