Jump to content

Customizing "Sale" flag with different words

Go to solution Solved by paul2009,

Recommended Posts

Site URL: http://ginnydi.com

I'm using this code to change "Sale" to "Pre-Order":

.product-mark.sale {
    font-size: 0;
}
.product-mark.sale:before {
    font-size: 15px;
    content: "Pre-Order";
}

It's working mostly as intended, but for some reason it made the actual rectangle of the "flag" behind the text much narrower.  You can see it on this test page, but I've also attached a screenshot of it for posterity. You can see that compared to the "Sold Out" flag to the right, the flag is much thinner. How can I fix this?

Screen Shot 2021-10-29 at 3.40.57 PM.png

Link to comment
  • Solution

The code is just slightly oversimplified. If you add a line height it should be fine. For example, here's the second part of the code, with this added:

.product-mark.sale:before {
  font-size: 15px;
  content: "Pre-Order";
  line-height: 1em;
}

  If this post has helped you, please click a 'Like' or 'Thanks' icon below  ⬇️

About me: I'm Paul. A SQSP User for 18 yrs, I've been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own 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 fuels my work.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment
1 hour ago, paul2009 said:

The code is just slightly oversimplified. If you add a line height it should be fine. For example, here's the second part of the code, with this added:

.product-mark.sale:before {
  font-size: 15px;
  content: "Pre-Order";
  line-height: 1em;
}

  If this post has helped you, please click a 'Like' or 'Thanks' icon below  ⬇️

That fixed it perfectly!! Thank you so much!

Link to comment

Create an account or sign in to comment

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

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