Archived topic
How to center shortcode in container of a grid
5 replies · Started by Karsten on November 16, 2021
Hey friends,
I have a questions regarding this review grid at the beginning of the blog post:
I tried using <center>[site_reviews_summary assigned_posts="post_id" rating_field="rating" hide="bars,summary"]</center>, but this doesn’t work.
Please check and advise.
thank you
karsten
Hi there,
it depends on the HTML/CSS of the shortcode. But you can try this:
1. Add a GenerateBlocks Container Block, and set its Alignment to Center.
2. Add the Shortcode inside the Container Block.
Hey David,
thank you for your suggestions.
But unfortunately this didn't solve the issue.
Could you please check it out and try to align center the star rating short code. I have added login details.
Thank you for your great support.
Best, Karsten
You need to select the container(grid-item) which holds the shortcode, set its alignment to center:
https://www.screencast.com/t/itNwPfsNEEhf
Hey Ying, thank you for your quick response.
I have done as show in the screencast but the star rating is still not in the center of the second grid container as you can see here.
I gave different background colours to the three containers for better visual clarity.
Please check and advise.
Thank you
The container has set to center, but the content of the short code itself is not set to center.
Although it should be a question for the plugin, but you can give this CSS a try,
.glsr-default .glsr-summary {
justify-content: center;
}
Let me know if this helps :)