Docs    Instagram    Customizations

Vertically center Instagram caption on hover

A JavaScript snippet that vertically centres the caption text shown when a visitor hovers over an Instagram post.

To vertically center the Instagram caption text when hovering over a post, you can add the following JavaScript to your site. This can be done manually using a custom JavaScript plugin. For further information see our documentation here.

$('.sbi_hover_top').each(function(){
  var $self = $(this);
  $self.css({
    'position' : 'absolute',
    'top' : ( $self.parent().height() - $self.height() ) / 2
  });
});
support

Couldn’t find your answer in the docs?

Contact Support