Jump to content

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

Link to comment
  • Replies 5
  • Views 2.2k
  • Created
  • Last Reply

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.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

@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>

 

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
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.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.