Solved

Remove table borders and center align td's in Supply theme on homepage and product pages

VicVanSkyhawk
Tourist
3 0 2

Hi,

 

I'm sure this has to be covered here somewhere since it's such a basic thing but I can't find anything that works so, any instruction would be much appreciated:

I made a hard coded html table on my homepage (will add it to product pages also) with a custom html section.

  1. I can not get the border to disappear.
  2. I can't get the contents of the <td>s to center align

Before I spend 3 hours trying to find out what to change in the backend, can someone help me out with an easy way to override the template css?

I'm using supply if that matters.

Cheers,

Victoria

(halloweenglowmasks.myshopify.com)

 

Accepted Solution (1)
Kinjaldavra
Shopify Partner
2302 570 1423

This is an accepted solution.

hello @VicVanSkyhawk 

please Go to Online Store->Theme->Edit code then go to assets/theme.css ->paste below code at the bottom of the file.

  #shopify-section-1632781800b1cef4b3 tr  td, #shopify-section-1632781800b1cef4b3 th{
 border: transparent;
 text-align: center !important;
}

 

View solution in original post

Replies 5 (5)

PaulNewton
Shopify Partner
6275 574 1324

I'm sure this has to be covered here somewhere since it's such a basic thing but I can't find anything that works so,


Basic doesn't mean others have done the exact specific thing.

You didn't reference anything specific, are you talking about 'secure checkout' , 'customer support' images?

 

Try the following,

Always backup themes before changing code

Add an ID to your table so this does not effect EVERY other table on the site

 

<tbody>

 

becomes

 

<tbody id="trust_signal_badges">

 

 

Add the following CSS style tag to your tables custom code area, or extract the css to the bottom of your theme.scss.liquid without the <style></style> tags

 

<style>
table#trust_signal_badges td {
    border: none;
    text-aling: center;
}
table#trust_signal_badges td img {
    display: inline;
}
</style>

 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


VicVanSkyhawk
Tourist
3 0 2

@paul I really appreciate your help!

I put the code you supplied in the tbody and the css file. That didn't work. Then I just went ahead and put the style directly in the custom html field in the homepage (btw yes you were right, it is the table with the trust badges) but it's not working. I wonder should I be using different syntax. I changed the ID for the tag (picked up the align/aling typo in the original code you supplied so it wasn't that)

It's been a decade since I messed with css/html but I'm wondering is it the syntax. Should I be using .inserttagname instead of #instertagname. I guess I'm going to have to get more fluent again. Is there a pagebuilder you can recommend?

dmwwebartisan
Shopify Partner
12289 2547 3698

@VicVanSkyhawk 

Please add the following code at the bottom of your assets/theme.scss.liquid file.

#shopify-section-1632781800b1cef4b3 td, #shopify-section-1632781800b1cef4b3 th{
border: 0px !important;
text-align: center !important;
}

Hope this works.

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
Kinjaldavra
Shopify Partner
2302 570 1423

This is an accepted solution.

hello @VicVanSkyhawk 

please Go to Online Store->Theme->Edit code then go to assets/theme.css ->paste below code at the bottom of the file.

  #shopify-section-1632781800b1cef4b3 tr  td, #shopify-section-1632781800b1cef4b3 th{
 border: transparent;
 text-align: center !important;
}

 

VicVanSkyhawk
Tourist
3 0 2

@Kinjaldavra YAY. This did it. Thank you mucho!!