Jump to content

Targeting Blog Pages with Specific CSS

Recommended Posts

Posted

Hello,

I'd like to target specific classes with custom CSS only when they show on blog pages. I am already targeting specific CSS classes with custom CSS when they are on a specific regular Squarespace page using #collection-6490ee41267056672611735a{ [css classes]} but I'm not sure if there is a collection ID or how to find it for specific blog pages (i.e. the pages that you navigate to after clicking on a blog in a collection item). Thanks for the time!

  • Replies 2
  • Views 693
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Suppose your CSS like this

h1, h2, h3 {
	font-size: 30px;
}

Wrap your code in style tag, you will have

<style>
  h1, h2, h3 {
  	font-size: 30px;
  }
</style>

Next, edit Blog Post you want to run code > Add a Code Block (top or bottom of page) > Paste this code

<style>
  h1, h2, h3 {
  	font-size: 30px;
  }
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.