Align the gallery shortcode



I’m trying to align the thumbnails of the gallery short code with other elements on the page. Is there a way to stretch and shrink the thumbnails so they’re always against the vertical edges of the div.

if not is there a way to centre the thumbnails?



Hello @parousia,

We are not clear about your requirement. Can you provide screen-shot which can demonstrate the same?




Sorry for not being clear enough. I’ve linked two rough images showing the gallery out of alignment with other elements. I would either like to be able to center the thumbnails within the column or align the left and right thumbnails to the edge. Ideally with responsive behavior.

Thanks again!


Hello @parousia,

It looks like theme related styling. If you see on our demo sites, its showing fine ->

Check once with WordPress Default theme and let us know.




The thumbnails aren’t centered on your site either?

see linked screenshots. Is there any CSS that would align it? I’ve been experimenting but cant figure it out.


Hello @parousia,

It will vary from theme to theme with respect of thumbnail size ( )

Here is the same thumbnail size in twenty Thirteen default theme ->

You need set image size of thumbnail according to your theme.




the problem with that is if I align the thumbnails on one screen size on one theme it will be out of alignment on another. As you shrink your browser it pushes a thumbnail off a row and leaves a giant gap on the right hand side, (this behavior happens on every theme). I cant set different sized thumbnails for different screen sizes, or browser widths.

being able to center thumbnails might alleviate this issue, because when a thumbnail gets pushed off a row the thumbnails would still be in the center of the page.

Thanks again for your continued help!


Is there a way to center it with css?


Hello @parousia,

You can try below css code by putting it to Custom CSS tab under rtMedia admin settings:

.rtmedia-container .rtmedia-list .rtmedia-list-item {  
float: none;
display: inline-block; 
.rtmedia-container .rtmedia-list {  
overflow: hidden;  
text-align: center;

It should work if ‘Enable Masonry Cascading grid layout’ setting of Display tab is set to off under rtMedia admin settings.



Amazing that worked perfectly! Thankyou!

Will be buying the pro version shortly!

Align thumbnails

Sorry one last question I’m trying to remove the thumbnail titles from the gallery using the shortcode below, however its not working? Is this a pro only feature or am I doing something wrong? Thanks!

[rtmedia_gallery global=“true” per_page=“30” media_title=“false”]


Hello @parousia,

Yes, you are doing right. media_title parameter is available with free version only and it should work.

We have also created one demo post for you on our demo site, you can check it by yourself here ->

Thanks you.