Jump to content

Custom CSS: how to use an ID selector for one blog index page paragraph but not the other blog index page?

Recommended Posts

Hello—
 
This website I'm developing
has two distinct and different blog types
  1. COPD News
  2. Real-FAQs 
 
1. For the COPD news INDEX page
 
 I'd like to keep the default blog excerpt paragraph style ( the “element") , which is black sans-serif text
 
.blog-excerpt p {
default styles
}
 
 
2, For Real-FAQs
 
I’d like to use an #id selector to style the element with the specified PAGE id
 
 
i.e. ths CSS style ONLY for the Real-FAQs blog excerpt paragraphs
 
.blog-excerpt p {
color: #1470AF;
font-style: italic;
font-family: Georgia, "Times New Roman", Times, serif;
}
 
To do so on a website I would normally add an ID in the CSS to 
 
#ID.blog-excerpt p {
color: #1470AF;
font-style: italic;
font-family: Georgia, "Times New Roman", Times, serif;
}
 
However, when I look at the HTML source code, and I add an ID i found on the Real-FAQ page for the section that contains the excerpt
 
I don't want it to apply to the COPD news page just to the Real-FAQs main page
 
Please advise.
 
Thanks, Jim
Link to comment
  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

if they are set up as two different blogs in your pages panel, you can add the code to the advanced PAGE HEADER CODE INJECTION instead of your main site css. Just make sure to wrap your css in <style></style>

Edited by dnmddy
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.