Is there a way to standardize the size of a table that has 2 columns the same width so that all product pages that have tables in them would be the same size?
Topic summary
A Shopify store owner seeks to standardize table dimensions across product pages, specifically wanting two-column tables with equal widths. Screenshots show inconsistent table sizing on different product pages.
Solution provided:
- Add code to
theme.jsfile to remove inline table styles - Set fixed table width (600px total, 300px per column) via
theme.css
Mobile responsiveness issue:
Initial solution works for desktop/tablet but tables remain too wide on mobile devices, requiring horizontal scrolling.
Final fix:
Implement responsive CSS using media queries:
- Tables set to 100% width on screens under 400px
- Table layout changed to
unsetto allow text wrapping - Enables content to display without side-scrolling on mobile
Status: Resolved. The user confirms all solutions work successfully across devices.
Hello @Mark3347
To provide you with the most precise solution in this case, could you please share your page URL ( with pass if your store password is enabled )?
Thank you and hope to hear from you.
Best regards,
GemPages Support Team
Here is one
Hope this is what you’re asking for.
Hi @Mark3347
To make 2-column tables the same size, you can try the following:
- Online Store → Themes → Edit Code
- Find the theme.js file, add this code at the end of the file, and click Save:
...
document.querySelector('.spec_table').removeAttribute('style');
Your tables will be the same size:
We hope that this can help you.
Thanks! That worked. Is there a way to specify how wide I want the columns to be? Currently they are the full width of the desktop screen. I’d like them to be around 600px total, 300px per column, about 1/3 of the screen in width. Is this possible?
Also, is there a way for tables to wrap text automatically on mobile devices so the customer doesn’t have to scroll side to side?
Hi @Mark3347
Please follow these steps:
- Find the theme.css file, add this code at the end of the file, and click Save:
table {
width: 600px !important;
}
table tr td {
width: 300px !important;
}
@media screen and (max-width: 400px) {
table{
width: 100%;
}
}
- Here is the result:
We hope that it will work for you.
Yes! This works great for tablets and desktop, but the table is still too wide for a mobile phone. I tried tweaking the numbers for the mobile screen and width, but I didn’t see any change. I added a link below for you to use on a mobile screen. Ideally, I’d like to have the table width narrow enough to not have to scroll side to side to see all of the information. Maybe the text can wrap with the narrower columns?
Thanks again!
This theme is not published yet. It is Dawn 8.0
Hi @Mark3347
With your problem you can do it this way:
@media screen and (max-width: 400px) {
table{
width: 100% !important;
}
.rte table {
table-layout: unset !important;
}
}
- Here is the result:
We hope that this can help you.
Fantastic! Thanks so much!





