Site logo

Archived topic

Apply styles to pages only store-related

9 replies · Started by Mihail on August 25, 2021

Viewing posts 1–10 of 10

Hello everyone! ;)

I want to add a shadow for a store container. More precisely, for all pages that are associated with the store: from the main page of the store, categories, and ending with the shopping cart.

Can I do it?

I am currently using this code:

.inside-article {
border-radius: 4px;
box-shadow: rgba (0, 0, 0, 0.04) 0px 3px 5px;
}

shop page - ok:
https://prnt.sc/1qit2ze

another page - not good:
https://prnt.sc/1qit5ve

However, this means that the shadow will be applied throughout the site...

I need to apply these rules not only on the store page, but also on other pages that are related to the store: one product, product categories, cart and others.

As I understand it, the above code will add the rules I need only for the store page (/shop).

Hi there,

try:

.woocommerce .inside-article {
    border-radius: 4px;
    box-shadow: rgba (0, 0, 0, 0.04) 0px 3px 5px; 
}

woocommerce is a body class that is specific to all woo pages.

woocommerce is a body class that is specific to all woo pages.

Unfortunately, this is not true.

https://prnt.sc/1qkowwd
This is how, for example, the shopping cart page looks like it did before, without the shadow or roundness.

Hi there,

For cart page, try this woocommerce-page instead of woocommerce.
Let me know :)

Initially I tried using .woocommerce-page .inside-article, .woocommerce .inside-article {...}

But, as it turned out, it is enough to use .woocommerce-page .inside-article {...}. In this case, the styles are applied everywhere (store page, category, attribute, cart, and so on).

Thanks! :)

And one last little question. I don't want to create a separate topic for him.

For some reason unknown to me, the UPDATE CART button has a transparency that I have not set anywhere else.
https://prnt.sc/1qlyl7e
https://prnt.sc/1qlynr8
Why is transparency applied? How do I fix this?

Please add any item to your cart and go to the cart /cart/ page so you can see it.

That's added by Woocommerce by default.

Try this CSS to change the opacity:

table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .button {
    opacity: 1;
}

It works, thanks! :)

You are welcome :)

This archived topic is closed to new replies.