Jump to content

How to center text on a gallery text overlay

Go to solution Solved by Ziggy,

Recommended Posts

Password: eleanor

 

I have used the following code in the image description of each image in these two galleries to create a text overlay on hover. However, I now need to centre the text - please could someone help me alter the code to do this?

 

Code: <a href="https://www.waterperryoperafestival.co.uk/2022.html">MANSFIELD PARK <br> WATERPERRY OPERA FESTIVAL </a>

 

Thank you! 

Poppy

Link to comment
  • Replies 6
  • Views 247
  • Created
  • Last Reply

Top Posters In This Topic

If you add:

style="text-align:center;"

It should center the text, like this:

<a href="https://www.waterperryoperafestival.co.uk/2022.html" style="text-align:center;">MANSFIELD PARK <br> WATERPERRY OPERA FESTIVAL </a>

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Can you share your website URL?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Try adding this Custom CSS:

.gallery-caption p.gallery-caption-content {
    text-align: center !important;
}

Let me know if that works.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.