Jump to content

Change category link background on blog and summary block to different colours

Recommended Posts

I'm not able to change my category blocks on my blog posts and summary blocks to different colours, i followed a similar thread and copied the CSS and adjusted it accordingly but it still didn't work.

I tried this, but nothing changed, I'm wondering if its because I'm using a single column blog style?


a.blog-categories[href="/blog/category/Ongoing"] {
    background-color: #0CC0DF;
    color: #FFFFFF;
    font-weight: bold;
    padding-left: 5px;
    padding-right: 5px;
}

span.blog-categories-list a {
    padding: 0.15em 0.1em 0.15em 0.15em !important;
    color: #fff !important;
    letter-spacing: .8px;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}
/* Ongoing */
span.blog-categories-list a[href="/all-topics/category/Ongoing"] {
    background-color: #0CC0DF;
}
/* Completed */
a.blog-categories[href="/all-topics/category/Completed"] {
    background-color: #0CC0DF;
}

Link to comment
  • Replies 4
  • Views 870
  • Created
  • Last Reply

Top Posters In This Topic

10 hours ago, ArtificialVisions said:

I'm not able to change my category blocks on my blog posts and summary blocks to different colours, i followed a similar thread and copied the CSS and adjusted it accordingly but it still didn't work.

I tried this, but nothing changed, I'm wondering if its because I'm using a single column blog style?


a.blog-categories[href="/blog/category/Ongoing"] {
    background-color: #0CC0DF;
    color: #FFFFFF;
    font-weight: bold;
    padding-left: 5px;
    padding-right: 5px;
}

span.blog-categories-list a {
    padding: 0.15em 0.1em 0.15em 0.15em !important;
    color: #fff !important;
    letter-spacing: .8px;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}
/* Ongoing */
span.blog-categories-list a[href="/all-topics/category/Ongoing"] {
    background-color: #0CC0DF;
}
/* Completed */
a.blog-categories[href="/all-topics/category/Completed"] {
    background-color: #0CC0DF;
}

What is the website URL?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
On 6/27/2024 at 2:12 AM, ArtificialVisions said:

https://choucaircapital.squarespace.com/?noredirect

You can use this CSS code

span.summary-metadata-item [href*="category=Ongoing"] {
    background-color: #0CC0DF;
    color: #FFFFFF !important;
    font-weight: bold;
    padding-left: 5px;
    padding-right: 5px;
}
span.summary-metadata-item.summary-metadata-item--cats {
    opacity: 1 !important;
}

image.png.75eafc8034421a7b101b3a40bbcf0139.png

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!)

Link to comment
  • 2 weeks later...

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.