Jump to content

Excluding blog posts from universal css code to centre align text on mobile

Recommended Posts

Hi everyone,

I have managed to centre-align all text on my mobile site, which is working, but looks terrible for blog articles. I was wondering if there was a quick way to exclude the blog posts from a universal text align with css? 

The code I have used is below:

// centre align all text on mobile
@media only screen and (max-width: 480px) {
p, H1, H2, H3 { text-align: center; }}

Thanks so much

Talia

Screen Shot 2023-06-21 at 10.10.22 am.png

Link to comment
  • Replies 1
  • Views 154
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.