Cyperpunk-girl-333 Posted October 8, 2022 Share Posted October 8, 2022 Site URL: https://enchantanddelight.com.au/ Code I'm using for shop page <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script> <script> $(".products .grid-item").each(function(e) { $(this).append('<div class="sqs-add-to-cart-button sqs-suppress-edit-mode sqs-button-element--primary" role="button" tabindex="0" data-product-type="1" data-original-label="Add To Cart"><div class="sqs-add-to-cart-button-inner">Add To Cart</div></div>'); }); $(function() { $(".products .grid-item").each(function(e){ var dataItemId = $(this).attr('data-item-id'); $(this).find('.sqs-add-to-cart-button').attr('data-item-id', dataItemId); }); }); </script> i'd like to add style code to it so it displays a bit nicer if you refer to the image the button alignment is off and i would also like to margin it a few spaces down so isn't directly under font? can anyone please help me with my code styling Link to comment
Beyondspace Posted October 9, 2022 Share Posted October 9, 2022 18 hours ago, christina_marie_333 said: Site URL: https://enchantanddelight.com.au/ Code I'm using for shop page <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script> <script> $(".products .grid-item").each(function(e) { $(this).append('<div class="sqs-add-to-cart-button sqs-suppress-edit-mode sqs-button-element--primary" role="button" tabindex="0" data-product-type="1" data-original-label="Add To Cart"><div class="sqs-add-to-cart-button-inner">Add To Cart</div></div>'); }); $(function() { $(".products .grid-item").each(function(e){ var dataItemId = $(this).attr('data-item-id'); $(this).find('.sqs-add-to-cart-button').attr('data-item-id', dataItemId); }); }); </script> i'd like to add style code to it so it displays a bit nicer if you refer to the image the button alignment is off and i would also like to margin it a few spaces down so isn't directly under font? can anyone please help me with my code styling Use the following Css code .products-list .grid-item{ display: flex; flex-direction: column; align-items: center; } .products-list .sqs-add-to-cart-button { background: orange !important; } Support me by pressing 👍 if this useful for you BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Beyondspace Posted October 9, 2022 Share Posted October 9, 2022 My testing BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Cyperpunk-girl-333 Posted October 11, 2022 Author Share Posted October 11, 2022 (edited) Thank you Bangank36 i have added the css to the site. but is it possible to get the add to cart buttons to have smaller padding so the add to cart button is a bit thinner? Also would it be possible to get the add to cart button to sit a little lower so it isn't directly under the price. i appreciate any of your help These sections need a but of spacing and have you got a better idea on how I could make the sold-out text more visually appealing. Please help me with comment below as well @bangank36 Edited October 11, 2022 by christina_marie_333 Link to comment
Cyperpunk-girl-333 Posted October 11, 2022 Author Share Posted October 11, 2022 (edited) Ohh no the code broke the image product display on mobile view? Any idea how to fix. https://enchantanddelight.squarespace.com/config/pages/60b03e34c21917686d503ee0 I can't see the product images in mobile view @bangank36 Edited October 11, 2022 by christina_marie_333 Link to comment
Cyperpunk-girl-333 Posted October 12, 2022 Author Share Posted October 12, 2022 On 10/9/2022 at 11:17 AM, bangank36 said: My testing At you able to help @bangank36 Link to comment
Beyondspace Posted October 12, 2022 Share Posted October 12, 2022 I can not see these buttons now. Can you show them up? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Cyperpunk-girl-333 Posted October 13, 2022 Author Share Posted October 13, 2022 (edited) Hey bangank6 I have added to a different site www.spacept.com.au www.spacept.com.au could you please help me with the same problem the buttons are to close to the price and the images of the products don't display in mobile view. I will need to apply to other site but applied it here because the code has bugs. would you be able to help me fix it. Edited October 13, 2022 by christina_marie_333 Link to comment
tuanphan Posted October 15, 2022 Share Posted October 15, 2022 On 10/13/2022 at 8:41 AM, christina_marie_333 said: Hey bangank6 I have added to a different site www.spacept.com.au www.spacept.com.au could you please help me with the same problem the buttons are to close to the price and the images of the products don't display in mobile view. I will need to apply to other site but applied it here because the code has bugs. would you be able to help me fix it. Don't remove any code in your current code. Add to Design > Custom CSS body.view-list div.sqs-add-to-cart-button { margin-top: 20px; } figure.grid-image { width: 100% !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Cyperpunk-girl-333 Posted October 15, 2022 Author Share Posted October 15, 2022 Thank you so much 🙂 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment