Home › Forums › WoodMart support forum › Attribute table – every second line grey
Attribute table – every second line grey
- This topic has 5 replies, 2 voices, and was last updated 1 year ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
February 23, 2024 at 3:43 pm #543213
marika.kusnireParticipantHello!
I found website online, which is using Woodmart theme as well.
How can I achieve the same effect – every second line in attributes table are with grey background?See photo attached. And the link from the website, where I saw this effect, in privata content.
Attachments:
You must be logged in to view attached files.February 24, 2024 at 5:59 pm #543475
Aizaz Imtiaz AwanKeymasterHello,
The Additional Information tab on the WooCommerce Single Product Page displays information about product dimensions, weight, and possible attribute terms. Please add these terms into your site and share the page url so i will check it on your site and give you a possible solution.
Best Regards.
February 24, 2024 at 8:59 pm #543532
marika.kusnireParticipantHello, Aizaz!
You didn’t get what I asked 😉 I have added all the attributes already. I am asking about visual formatting (CSS). How to achieve effect like in picture I have added as sample from another site, which uses Woodmart theme- one attribute with no background, second attribute with grey background, third – white background, fourth – grey background and so on.. 😉
February 26, 2024 at 10:51 am #543736
Aizaz Imtiaz AwanKeymasterHello,
Inspect your attribute, and see which class relates. I am inspecting “pa_valsts”. See the all attributes classes and add the background color:
https://ibb.co/tK6K6K8Add the following Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:
tr.woocommerce-product-attributes-item--attribute_pa_valsts { background-color: #d9baba; } tr.woocommerce-product-attributes-item--attribute_pa_zimols { background-color: gray; }
Best Regards.
February 26, 2024 at 12:16 pm #543810
marika.kusnireParticipantHello, Aizaz!
Thanks.. This css adds the code, but it looks really bad (see attached, and it doesn’t matter, that color can be changed) and it is not working the same way as in the site, I have sent You.. :/ I inspected the code and when I compare, with this css code, this one adds extra line with background color info, which is not finded in that other site..
And to use css like this for each seperate attribute is difficult, because there is a lot of products with different attributes – some attributes are all the same for all the products, some are not. And some are global attributes, some are not as well.
I was hoping to use some css for all the attribute table (for example with this .shop_attributes).
And in that other site height for all the rows is smaller… Can that be adjusted as well?
Attachments:
You must be logged in to view attached files.February 27, 2024 at 10:34 am #544147
Aizaz Imtiaz AwanKeymasterHello,
Add the following Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:
.shop_attributes th { padding-left: 15px !important; padding-top: 15px !important; calc(var(--wd-attr-v-gap) / 1); } tr.woocommerce-product-attributes-item--attribute_pa_valsts { background-color: #fdfafa !important; } tr.woocommerce-product-attributes-item--attribute_svars-gb { background-color: #fdfafa !important; } tr.woocommerce-product-attributes-item--attribute_garums-mm { background-color: #fdfafa !important; } tr.woocommerce-product-attributes-item--attribute_lietderabgais-platums-mm { background-color: #fdfafa !important; }
Best Regards.
-
AuthorPosts
Tagged: attributes table
- You must be logged in to create new topics. Login / Register