Jump to content

Image icons as bullet points

Go to solution Solved by Beyondspace,

Recommended Posts

24 minutes ago, Elle_H said:

Site URL: https://rachel-balm.squarespace.com/work-with-me

Hi, Im wondering if someone can help with some css make an image icon as the bullet point like the image attached.

The website is : https://rachel-balm.squarespace.com/work-with-me Password: Rachel

And the image + url is : Gold+plant+leaves.png

Also, Im needing different icons for different sections so cant use css for the entire site.

RB- what if.png

I saw you already got it solved right?

image.png.d5336309b1b7398f3af6936a3a02c566.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
17 minutes ago, Elle_H said:

Hi, No, Ive done it as an image in Canva but its obviously not mobile responsive as an image and the text is too small on mobile device

LOL, sorry I not check it carefully, could you add a block with unordered list so I can suggest the code to modify it

Edited by bangank36

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • Solution
12 minutes ago, Elle_H said:

Thank you, ive removed the image and put it in as an unordered list.

Since the styling is block-specific, you got to know the id of each block

1. Install Chrome extension Chrome Web Store - Extensions (google.com)

2. Click on extension icon to get the block id and replace it into this snippet (replace the text: _block_id with id)

_block_id ul li>*:first-child::before {
  content: '' !important;
}
_block_id ul li {
  position: relative;
  list-style-type:none;
}
_block_id ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

3. On the specific case

#block-yui_3_17_2_1_1607577106512_8287 ul li>*:first-child::before {
  content: '' !important;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li {
  position: relative;
  list-style-type:none;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

 

image.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
3 minutes ago, bangank36 said:

Since the styling is block-specific, you got to know the id of each block

1. Install Chrome extension Chrome Web Store - Extensions (google.com)

2. Click on extension icon to get the block id and replace it into this snippet (replace the text: _block_id with id)


_block_id ul li>*:first-child::before {
  content: '' !important;
}
_block_id ul li {
  position: relative;
  list-style-type:none;
}
_block_id ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

3. On the specific case


#block-yui_3_17_2_1_1607577106512_8287 ul li>*:first-child::before {
  content: '' !important;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li {
  position: relative;
  list-style-type:none;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

 

image.png

Amazing! this worked!  Thank you so much! Saved me hours of searching.

Link to comment
  • 2 years later...
On 3/18/2023 at 6:47 PM, DevonHarris said:

Hi!  How would I target only one bullet point with this?  I'm trying to add different images for each bullet.  Hoping someone can assist!

Change this line

#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

to this

#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(1):before {
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(2):before {
 background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(3):before {
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}

you can see nth-child(1), (2), (3)

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
1 hour ago, tuanphan said:

Change this line

#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}

to this

#block-yui_3_17_2_1_1607577106512_8287 ul li:before {
	content: "";
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
  background-repeat: no-repeat;
  background-size: cover;
	position: absolute;
  width: 40px;
  height: 20px;
	left: -40px;
  top: 2px;
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(1):before {
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(2):before {
 background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}
#block-yui_3_17_2_1_1607577106512_8287 ul li:nth-child(3):before {
  background-image: url(https://static1.squarespace.com/static/5fa48e9e7c970759a6f2f59f/t/5fbc348263a1d011e44a0047/1606169730628/Gold+plant+leaves.png);
}

you can see nth-child(1), (2), (3)

@tuanphan this is amazing, THANK YOU SO MUCH!  I have been racking my brain all week trying to figure out how to correctly insert the :nth-item tag with no luck.  You are awesome!!!

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.