Jump to content

Is there any way to add a custom "class" or "id" to the auto-generated <div> when adding a block with the squarespace page editor?

Recommended Posts

Hi!

I'm having problems when I try to style an auto-generated block with the squarespace editor (text, image, section, etc).

Squarespace translates that block into a <div> with an "id" that sometimes starts with "yui..." and sometimes with "block...". When it is "yui" every time the browser is refreshed it changes and when it is "block" it does not.

What I would like to do is to add to a block a custom "id" or "class" so that I can identify them with css and modify their style.

I have attached two images:
- screen1: How squarespace renders a block (with its id "yui" and "block").
- screen2: What I want to do. Add a custom class "myCustomClass" to the <div> parent of the generated block.

Is there any way to do this?

 

Thank you so much!!

screen1.png

screen2.png

Link to comment
  • Replies 1
  • Views 378
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

1 hour ago, SergioR said:

Hi!

I'm having problems when I try to style an auto-generated block with the squarespace editor (text, image, section, etc).

Squarespace translates that block into a <div> with an "id" that sometimes starts with "yui..." and sometimes with "block...". When it is "yui" every time the browser is refreshed it changes and when it is "block" it does not.

What I would like to do is to add to a block a custom "id" or "class" so that I can identify them with css and modify their style.

I have attached two images:
- screen1: How squarespace renders a block (with its id "yui" and "block").
- screen2: What I want to do. Add a custom class "myCustomClass" to the <div> parent of the generated block.

Is there any way to do this?

 

Thank you so much!!

screen1.png

screen2.png

Use this tool to identify the id of block or section that did not change each page refresh

Chrome Web Store - Extensions (google.com)

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

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.