-
AuthorPosts
-
May 10, 2023 at 1:39 pm #1406992
Hi,
This is the website that I’m creating:
How do I do the following?
1. How do I make the button bigger and change the colour and styling?
2. How do I add another ‘Add to Basket’ button on the page at the bottom?
3. I also want to change the mobile view so only a maximum of 4 pictures are shown but they are reduced so all the important information is ‘above the fold’. Like how this company does it:
May 13, 2023 at 9:09 pm #1407300Hey ballindigital,
Thanks for your patience and the link to your site, to make the Add to Basket button lager and change it’s style you can try some css like this:#top.woocommerce-page .main_color .button[name=add-to-cart] { background-color: #ffd1ed; width: 200px; font-size: 16px; }
I’m not sure how you want to style the button, please explain further if you need more help with it.
#2 where on the page do you want the second Add to Basket button, in the Description?
#3 I don’t see a link to your example site, but even with only 4 images on mobile I don’t believe the info would be “above the fold” perhaps moving the images after the info on mobile would achieve what you would like? If so try this css:@media only screen and (max-width: 767px) { #top.single-product .product { display: flex !important; flex-wrap: wrap !important; } #top.single-product .single-product-main-image { order: 2 !important; } #top.single-product .single-product-summary { order: 1 !important; } }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 14, 2023 at 10:19 pm #1407376Thank you Mike,
Number 1 works perfectly :)
2. Just at the bottom of the page so after the additional information.
3. Appreciate the suggestion but I feel that it is important to have the images showing first. Is there a way to show just two images side by side instead? Perhaps a slider if possible?
This is the website that I was referring to.
May 16, 2023 at 12:06 pm #1407568Hi,
Thank you for your patience and the link to the page, Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 767px) { #top.single-product .woocommerce-product-gallery .thumbnails a:nth-child(n+4) { display: none; } }
This will show one large image and three thumbnails on mobile so the product info also shows “above the fold”
After applying the css, please clear your browser cache and check.Best regards,
MikeMay 20, 2023 at 3:46 pm #1408019Thank you for this.
Ideally, I would like to have four small thumbnail images with two being displayed side by side in a grid of four.
Is this possible?
Also, if I just wanted to show the main image, is this the correct CSS code? Or is there a simpler way?
@media only screen and (max-width: 767px) {
#top.single-product .woocommerce-product-gallery .thumbnails a:nth-child(n+0) {
display: none;
}
}May 20, 2023 at 11:24 pm #1408035Hi,
Thank you for your patience but unfortunately I don’t see an easy way to create a grid of four on mobile, I recommend using your css to only show the main image, this looks like it’s working correctly.Best regards,
MikeMay 20, 2023 at 11:33 pm #1408036Thanks Mike – what about just showing the thumbnails and not the main image?
May 21, 2023 at 1:03 am #1408040Hi,
Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 767px) { #top.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper > a { display: none; } }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeMay 24, 2023 at 3:40 pm #1408432Mike,
Thank you so much.
This is almost perfect – the last change I would like to make is for it to show just three thumbnails instead of all of them please..
May 24, 2023 at 6:22 pm #1408462Hi,
Try adding this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 767px) { #top.single-product .woocommerce-product-gallery .thumbnails a:nth-child(n+4) { display: none; } }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 25, 2023 at 3:01 pm #1408533This actually shows the main image with thumbnails underneath?
I was just looking to amend the previous code:
@media only screen and (max-width: 767px) {
#top.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper > a {
display: none;
}
}To show only three thumbnails instead of all of them :)
May 25, 2023 at 4:57 pm #1408558Hi,
I believe that you misunderstood, I suggested adding the last snippet also, that is try using both together.Best regards,
MikeMay 25, 2023 at 6:18 pm #1408571Apologies Mike!
This solution has worked perfectly.. You’re amazing!
May 26, 2023 at 2:39 am #1408597Hi ballindigital,
I’m glad that Mike could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Add more ‘Add to Basket’ buttons on product page and make button bigger.’ is closed to new replies.