Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
oliviapaulson

Need help styling product block with custom CSS

Recommended Posts

Hi, I'm trying to style a product block on one of my pages and currently have just the "add to cart" feature being displayed, but the button is very small and I'd like to make it bigger. Does anyone know how to add padding/make font bigger on the buttons (that are technically part of a product item)

The link to my site is fpg.com/masterclass if anyone needs that.

image.thumb.png.4e422617373f2190e2d68767583b0c20.png

image.thumb.png.ea07551aeca4621d68a1421d43559d18.png

Share this post


Link to post

If you want to make all the Product Block buttons larger, you can use something like this in Custom CSS, changing the values to suit your needs:

.product-block .sqs-add-to-cart-button {
  padding: 2em 3.5em!important;
}

Note also that you have errors in your header injection. The first of which is a missing

</script>

tag.


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDate Picker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links.

Share this post


Link to post

@oliviapaulson Home > Settings > Advanced > Code Injection > Header

Your code

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-144028198-1');

 <script>

It should be

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-144028198-1');

 </script>

 

Edited by tuanphan

You can send your question to my email to get faster answer.

How to Setup Password & Share URL - Free Templates - Free Code - CSS ID List

Share this post


Link to post

Thank you- if anyone sees any other errors in my code, please let me know, most of what I've used is what i've found online and there may be things that could be done more efficiently/better and I'd have no idea.

Share this post


Link to post
4 hours ago, oliviapaulson said:

most of what I've used is what i've found online and there may be things that could be done more efficiently/better and I'd have no idea.

Olivia

It concerns me that you may be using code you don't understand. If that's the case, please consider getting help from an expert who you can trust, rather than from forums like this. Adding JavaScript (anything with a <script> tag in it) can expose your website to security and performance risks, including malicious code and surreptitious tracking.

In summary, if you don't understand the code, please don't use it. There’s no guarantee that a script is doing what you think it is.


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDate Picker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...