Jump to content

Image icons as bullet points

Go to solution Solved by Beyondspace,

Recommended Posts

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

Link to comment
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

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

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

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

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

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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
  • 6 months later...

Hi! I'm trying to do something similar to this, but I'm trying to have different blocks for each bullet point so that they each have a fill/background color. Kind of like buttons, but without being linked to anything. 

I've gotten this far, but the icon doesn't stay lined up when the window is resized, and the text wrap causes the block to resize too, which is not what I want. 

 

This is the code I have for one of them (they're all identical): 
 

#block-yui_3_17_2_1_1697415325196_13335 {
ul[data-rte-list] li>*:first-child::before {
    content: " " !important;
background-image: url(https://static1.squarespace.com/static/649c8c8cd7996c5799487d6a/t/652ca02dd6c2f2537f4f2db5/1697423406239/MD-Yellow+on+Black+Star+Bullet-Plain.png);
  display:inline-block;
  background-size:contain;
  background-repeat:no-repeat;
  background-position: center;
  position:absolute;
  height:80px;
  width:80px;
  margin-left: -110px;
  top:12.5px;
  bottom:15px;
  }
}

Any suggestions? Thank you! 

Screenshot 2023-10-15 at 8.38.46 PM.png

Edited by mochhug
Clarifying code
Link to comment
On 10/16/2023 at 10:39 AM, mochhug said:

Hi! I'm trying to do something similar to this, but I'm trying to have different blocks for each bullet point so that they each have a fill/background color. Kind of like buttons, but without being linked to anything. 

I've gotten this far, but the icon doesn't stay lined up when the window is resized, and the text wrap causes the block to resize too, which is not what I want. 

 

This is the code I have for one of them (they're all identical): 
 

#block-yui_3_17_2_1_1697415325196_13335 {
ul[data-rte-list] li>*:first-child::before {
    content: " " !important;
background-image: url(https://static1.squarespace.com/static/649c8c8cd7996c5799487d6a/t/652ca02dd6c2f2537f4f2db5/1697423406239/MD-Yellow+on+Black+Star+Bullet-Plain.png);
  display:inline-block;
  background-size:contain;
  background-repeat:no-repeat;
  background-position: center;
  position:absolute;
  height:80px;
  width:80px;
  margin-left: -110px;
  top:12.5px;
  bottom:15px;
  }
}

Any suggestions? Thank you! 

Screenshot 2023-10-15 at 8.38.46 PM.png

Can you share link to this page? We can check easier

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
  • 2 weeks later...

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.