Tagged: #background #fixed
-
AuthorPosts
-
January 21, 2022 at 12:05 pm #1336526
Hi a few weeks ago you gave me the css code to add the background to the shop and product pages:
.archive div.container_wrap {
background: url(https://www.toysanarchy.com/wp-content/uploads/2022/01/annie-spratt-scaled.jpg);
}but would it be possible to have it all transparent and blocked, that is, that it does not scroll while the page is scrolled?
if you see the shop page: https://www.toysanarchy.com/negozio/ the image of the product has a black background and also the writings.
same thing on the product page the table in the description has a black background.
can you help me? thanks gianlucaJanuary 22, 2022 at 8:36 pm #1336674Hey sitibus,
Thank you for your patience, to make the shop product thumbnail and container, and the product table transparent, please try this css:#top.single-product .woocommerce-product-details__short-description table, #top.single-product .woocommerce-product-details__short-description table tr { background: transparent; } #top.woocommerce-shop .inner_product.main_color, #top.woocommerce-shop .inner_product_header { background-color: transparent; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeJanuary 23, 2022 at 1:56 pm #1336735Hi and thanks Mike works perfectly.
What about the background instead?
.archive div.container_wrap {
background: url (https://www.toysanarchy.com/wp-content/uploads/2022/01/annie-spratt-scaled.jpg);
}Is it possible to have it blocked when scrolling the page?
Thanks Gianluca
January 23, 2022 at 2:52 pm #1336738Hi,
Glad this helped, I believe that you are asking about setting your background image to “fixed” so it doesn’t move while the elements scroll over it, but there is a known bug in Safari that doesn’t support this on iPhones & iPads, Safari has known about this for a few years and doesn’t look like they are in a hurry to fix it.
So with this in mind if you want to try this please include admin login in the Private Content area so we can adjust the precious background css, if not let us know that we can close this thread.Best regards,
MikeJanuary 23, 2022 at 2:59 pm #1336739Yes I’m doing it..
Tks
GianlucaJanuary 23, 2022 at 3:46 pm #1336740January 24, 2022 at 10:10 am #1336854Thanks so much it works perfectly.
Only now there are some problems on the home page:
1) as you can see in the image: https://www.toysanarchy.com/wp-content/uploads/2022/01/toy-testata-1.png the header is no longer glassy but you can see the background.
2) https://www.toysanarchy.com/wp-content/uploads/2022/01/toy-testata-3.png the background of the site overwrites the background image of the NEWSLETTER section / green arrow) and there is a black line between the two sections (red arrow)
can you help me?January 24, 2022 at 11:52 am #1336877Hi,
Thank you for the update.
1-2.) This css code also applies the background image to the header container.
.page .container_wrap { background: url(https://www.toysanarchy.com/wp-content/uploads/2022/01/annie-spratt-scaled.jpg); background-attachment: fixed; }
To retain the original header background, you have to replace the css code with this one.
.page #main .container_wrap { background: url(https://www.toysanarchy.com/wp-content/uploads/2022/01/annie-spratt-scaled.jpg); background-attachment: fixed; }
Also, please note that container_wrap is a common class name, so the css code above will be applied on every sections in the page. You may have to adjust the css selector a bit so that the changes will be only applied on the intended sections. Adding a custom css class name to the sections should help.
// https://kriesi.at/documentation/enfold/add-custom-css/#enable-custom-css-class-name-support
Best regards,
IsmaelJanuary 24, 2022 at 12:39 pm #1336887I tried but I couldn’t, everything looks exactly the same to me
January 25, 2022 at 8:41 am #1336988 -
AuthorPosts
- You must be logged in to reply to this topic.