A user needed to remove unwanted background colors and borders from a table on a specific Shopify page (“our-impact”) without affecting tables site-wide.
Initial Problem:
Table automatically displayed purple background on certain cells and unwanted borders
User wanted transparent background with no borders
Solutions Offered:
Multiple community members provided CSS code snippets targeting .page-content table elements. However, these would affect all tables across the entire theme.
Final Working Solution:
The successful approach involved two steps:
Adding a conditional class to the <body> tag in theme.liquid to target only the specific page:
{% if page.handle == 'our-impact' %} page_title="our-impact-class"{% endif %}
Adding page-specific CSS to theme.css that removes backgrounds and borders only when that class is present
Outcome:
The solution successfully removed both the table borders and purple background from only the targeted page, leaving other pages unaffected. The issue was marked as resolved.
Summarized with AI on November 4.
AI used: claude-sonnet-4-5-20250929.
I have added a table into my page, but it automatically adds a background color to one side and a border around that cell, as well as at the bottom - is there code to get rid of it? I just need a transparent background and no border.
To remove the background and borders from your table:
Edit your theme’s CSS:
Go to Online Store > Themes > Edit code and open themes.css.liquid or styles.css.liquid.
Add this CSS:
/* Remove background and borders from the table */
.page-content table {
background-color: transparent !important;
border: none !important;
}
/* Remove cell borders and background for each cell */
.page-content table td, .page-content table th {
background-color: transparent !important;
border: none !important;
}
save and refresh.
Got it! If you found my suggestions helpful, please consider liking or marking it as a solution.
Your feedback is appreciated! If you have any more questions or need further assistance, just let me know.
Thanks! Just to clarify - will that change all tables throughout the site, since I am amending the theme? I only need to change the table on this page…
That worked for removing the border on the table, but it didn’t remove the purple background in the table; it removed the background on the page itself instead…