New Shopify Certification now available: Liquid Storefronts for Theme Developers

HELP WITH SHOPIFY TABLE

Solved
LuizaSMC23
Tourist
12 0 0

Hi, I'm trying to add a table, in the product edition page the table appears, but in the product page no column or row line appears. How can I make the line appear? Also, on the live product page, the table is cut

 

For the table lines, I have tried to add the code  below at my theme.css code and it didn't help

td, th {
border: 2px solid #999 !important;
}

 

Edition page: table lines appear, table centralized

LuizaSMC23_0-1688909733794.png

 

Live page: no table lines and table cut

LuizaSMC23_1-1688909868877.jpeg

 

Thanks in advance!

 

Accepted Solution (1)
dannyelo
Shopify Partner
180 37 36

This is an accepted solution.

Hello,

 

Is not because of the theme.

I already see your code loading in the page. But you put it inside a comment.

All code inside /* (code here wont run) */

 

Make sure you delete does slashes and asterisks.

 

Now you have it like this.

dannyelo_0-1689089775092.png

 

Change to this only.

.size-table tbody tr td {
  border: 1px solid #cdcdcd;
  padding: 4px;
}

 

Let me know,

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here

View solution in original post

Replies 14 (14)
dannyelo
Shopify Partner
180 37 36

Hello,

 

Please share the page url.

 

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
LuizaSMC23
Tourist
12 0 0

Hello, here it is:

https://shoptarz.com/

BSS-Commerce
Shopify Expert
2942 394 414

Hi @LuizaSMC23 ,
Can you kindly share your store link (with the password, if any) with us? We will check it and suggest you a solution if possible.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.

For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS

BSS Commerce - Shopify Apps & Store Development Service Provider

Hire a Shopify expert | Shopify Plus Store Development

LuizaSMC23
Tourist
12 0 0

Hello there, here it is:

https://shoptarz.com/

dannyelo
Shopify Partner
180 37 36

Hello,

 

I think there is a specificity issue with your css declarations.

This works in the inspector.

table tbody tr td {
  border: 1px solid #cdcdcd;
  padding: 4px;
}

 

Try adding a class to your html:

<table class="size-table">
 ....
</table>

 

And then select that class insted of all the table elements.

The css should look like this.

.size-table tbody tr td {
  border: 1px solid #cdcdcd;
  padding: 4px;
}

 

Also I see a lot of inline styles in your code, try to avoid that, because that cause a lot of problems later.

Hope this helps.

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
LuizaSMC23
Tourist
12 0 0

Hey, thanks for helping! Please your help because I don't understand about these things:

 

1- I should copy the first code and paste at my theme.css file?

2- I tried to find this html at the theme code, but I didn't find it there. Is this HTML at the edition product page?

3- Then I should copy the third code and paste in the theme.css file?

 

Sorry if this sound stupid, I really do not understand about it. Thanks in advance!

dannyelo
Shopify Partner
180 37 36

Hello!

 

dannyelo_0-1689013111832.png

Press the code button in the description editor.

 

Then write the class as in my example (inside the table tag).

class="size-table"

 

After that paste this code in your theme.css (at the bottom of the file).

.size-table tbody tr td {
  border: 1px solid #cdcdcd;
  padding: 4px;
}

 

Let me know.

Best

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
LuizaSMC23
Tourist
12 0 0

Hey, thanks! I think I understood, but I'm afraid it didn't work:

 

Here is what I did:

LuizaSMC23_1-1689024476853.png

 

LuizaSMC23_2-1689024505240.png

 

Here is how the table is now:

LuizaSMC23_0-1689024421573.png

 

LuizaSMC23
Tourist
12 0 0
dannyelo
Shopify Partner
180 37 36

Hello,

 

I check the testing page you sent me and for some reason is not loading those styles.

 

Try this:

1. Paste the styles into custom.css file instead of theme.css

2. Be sure your preview store is the same as the code you are editing.

3. Be sure to save the css file.

 

For me is working fine.

 

Let me know,

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
LuizaSMC23
Tourist
12 0 0

Hello! Thanks for your help, I guess still didn't work, I paste the code at custom.css.liquid. Maybe it's because of the theme that I'm using

dannyelo
Shopify Partner
180 37 36

This is an accepted solution.

Hello,

 

Is not because of the theme.

I already see your code loading in the page. But you put it inside a comment.

All code inside /* (code here wont run) */

 

Make sure you delete does slashes and asterisks.

 

Now you have it like this.

dannyelo_0-1689089775092.png

 

Change to this only.

.size-table tbody tr td {
  border: 1px solid #cdcdcd;
  padding: 4px;
}

 

Let me know,

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here
LuizaSMC23
Tourist
12 0 0

Hello, sorry for all the trouble! All perfect now, I really appreciate it! You rock 👏🙏

dannyelo
Shopify Partner
180 37 36

No worries! Its a pleasure!

❤️ Enjoyed my Shopify customization assistance? If I've helped you achieve your goals, consider showing your appreciation with a coffee tip! It means the world to me! ️ Thank you!
Buy me a coffee here