I would like to change the color of the text in hyperlinks in my blog posts. I am using the dawn theme.
I’ve searched for other ways to do this. I don’t want to change the color of button outlines through the theme settings. I’m hoping someone can provide some CSS code and the folder in which to place it so that I can change the color of hyperlinked text but only in my blog posts.
Open the theme’s CSS file
In the left panel, under the Assets folder, click on base.css :
Add this CSS code at the bottom
Scroll all the way to the bottom and paste this CSS code:
/* Change link color in blog posts /
.article-template__content a {
color: #1e90ff; / Replace this with your desired color /
text-decoration: underline; / Optional: adds underline for clarity */
}
.article-template__content a:hover {
color: #ff6600; /* Color when hovered */
}
To change the color of links only in your blog posts, you can add custom CSS in your theme. Here’s a simple way to do it:
Go to Online Store > Themes in your Shopify admin.
Find your Dawn theme, and click Actions > Edit Code.
In the Assets folder, open the base.css file (or similar CSS file).
Scroll to the bottom and add this CSS code: .blog .blog__article a { color: #your-color-code; /* Replace with the color you want */ }
Save the changes. This will change the link color only in your blog posts, leaving other areas like buttons unaffected. Replace #your-color-code with your preferred color code
If this was helpful, hit the like button and accept the solution.
Thanks