trs27 Posted June 26 Share Posted June 26 Hi I want to create buttons around the blog categories at the top of each blog post as well as the main blog page on my site. Each category needs a different colour background. I have managed to do this in the summary block (elsewhere on the site) but not on the blog page itself. I would also like to remove the comma between the categories. Is this possible? Below is the code I have used for one of the categories. .summary-metadata-item--cats a[href*="category=health"]{ background-color:#F4F7DE; text-transform: uppercase; letter-spacing: 3px; font-size: 12px; font-weight: 400; padding: .4em .7em;} Any help I can get would be great! Many thanks 🙂 Link to comment
paul2009 Posted June 26 Share Posted June 26 Please share a link to the page. tuanphan 1 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
trs27 Posted June 26 Author Share Posted June 26 https://keyboard-maracas-aats.squarespace.com/blog/category/calm Password: Talya tuanphan 1 Link to comment
tuanphan Posted June 27 Share Posted June 27 13 hours ago, trs27 said: https://keyboard-maracas-aats.squarespace.com/blog/category/calm Password: Talya You can use this CSS code a.blog-categories[href="/blog/category/calm"] { background-color: #f1f5f8; padding-left: 5px; padding-right: 5px; } a.blog-categories[href="/blog/category/health"] { background-color: #f8f9e9; padding-left: 5px; padding-right: 5px; } paul2009 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
paul2009 Posted June 27 Share Posted June 27 20 hours ago, trs27 said: I would also like to remove the comma between the categories. You can remove the commas with the following CSS: /* Hide commas in blog categories */ .blog-categories--comma { display:none; } Did this help? Please give feedback by clicking an icon below ⬇️ About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment