How can I make table lines appear on my product page?

Solved

How can I make table lines appear on my product page?

LuizaSMC23
Excursionist
20 0 5

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
184 37 37

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
184 37 37

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
Excursionist
20 0 5

Hello, here it is:

https://shoptarz.com/

BSS-Commerce
Shopify Partner
3477 463 540

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, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
LuizaSMC23
Excursionist
20 0 5

Hello there, here it is:

https://shoptarz.com/

dannyelo
Shopify Partner
184 37 37

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
Excursionist
20 0 5

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
184 37 37

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
Excursionist
20 0 5

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
Excursionist
20 0 5
dannyelo
Shopify Partner
184 37 37

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
Excursionist
20 0 5

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
184 37 37

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
Excursionist
20 0 5

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

dannyelo
Shopify Partner
184 37 37

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