Docs    Instagram    Customizations

Vertically center Instagram caption on hover

Version 6.0 and above

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
  });
});


Below version 6.0

To vertically center the Instagram caption text when hovering over a post, just use the following snippet.

Add this to the plugin’s Custom JavaScript section (Instagram Feed > Customize > Advanced > Custom JavaScript):

$('.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