A random line of code at bottom of website

Topic summary

A user discovered unexpected CSS code appearing at the bottom of their Shopify website—specifically styling rules for an \

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

For some strange reason there is a random line of code at the bottom of my website. This is the part of the code that is showing: .btn–add-to-cart { background: gold; border: none; color: white; }

I have no idea how to fix, any help appreciated.

Thanks

Hey @BaileyWickens ,

Based on the code snippet you provided, it appears to be a CSS rule for styling a “Add to Cart” button on your Shopify website. If you want to remove or modify this styling, you can follow these steps:

  1. From your Shopify admin, navigate to Online Store > Themes.
  2. In the current theme, click on the three dots and select “Edit code.”
  3. In the left sidebar, find and click on “Assets.”
  4. Look for a CSS file (e.g., theme.css, styles.css, or something similar) and click on it to open.
  5. Search for the .btn--add-to-cart selector within the CSS file.
  6. Either delete the entire code block associated with *.btn--add-to-cart* or modify the styling according to your preference.
  7. Click the “Save” button to apply the changes.
  8. Preview your website to ensure that the unwanted styling has been removed or modified.

Important Coding Reminders:

  • If you make changes to the original code and save the changes, we always suggest you first duplicate the theme and work in the duplicate. That way you can always go back to your previous version.
  • If you make changes to the original code in a theme and update your theme to a newer version in the future it will override past changes.
  • If you need custom changes but would prefer the help of a developer we recommend Shopify’s own Expert Marketplace.
  • If you’ve changed theme files and need to revert them, you can roll back .liquid files individually to a time and date before you made the changes.