A user wants to apply CSS gradient backgrounds (generated from tools like mycolor.space/gradient3) to specific pages (home and product pages) and elements (Add to Cart button, search bar) in their Shopify store, with the ability to easily modify colors.
Solution Provided:
Add conditional CSS code in theme.liquid file using Liquid template tags to target specific pages:
Use {% if template contains 'index' or template contains 'product' %} wrapper
Apply background-image: linear-gradient() with desired color stops
For buttons and search elements, add gradient CSS to theme.scss.liquid file
Alternative gradient color resources suggested: uigradients.com
Implementation Details:
Code should be placed in theme.liquid before the </body> tag (not directly under <head>)
For site-wide gradients, add CSS to assets/theme.scss at the bottom
The conversation includes code snippets demonstrating the exact syntax needed
Additional Request:
Another user asked about adding a 1px bottom border to the navigation menu for better visibility when scrolling.
Status: The discussion remains open with ongoing troubleshooting, as the original poster needed clarification on exact code placement and offered to share store details for personalized assistance.
Summarized with AI on October 29.
AI used: claude-sonnet-4-5-20250929.
I would like to add a CSS gradient background generated from a website like this → https://mycolor.space/gradient3 to specific pages such as the home & product pages on the website and be able to change and edit them to different colors at will. I would also like to change the colors of certain elements, such as Add to Cart button & the search bar background to the same gradient background if at all possible.
Does anyone know how to do either of these things?
Edit: I’m also using the Venture theme, which has both “theme.liquid” files as well as “theme.scss.liquid” files. Should this code be added into the theme.liquid file that you first mentioned or the theme.scss file.
Added the code, saved it, and refreshed my theme but the changes are not showing and the background is still the same. I added you on Skype. Are you available to do a screen share over Skype so that I can show you what I’m doing?