Jump to content

How to target multiple blocks with custom css

Recommended Posts

I' ve applied the following code to style an image. It works fine but I have 4 images in a row which I would like to style in the same fashion and preferably with the same code. I have tried to list the different block IDs with comma but doesen't work. It only applues the formatting to the last block I'm listing. What am I doing wrong?

/* banner collage image */
#block-yui_3_17_2_1_1666098058627_3198 figcaption {
    width: 70%;
}
#block-yui_3_17_2_1_1666098058627_3198 figcaption .image-card.sqs-dynamic-text-container {
    background: #f6c453;
    padding: 20px;
    width: 100% !important;
    margin-left: 0;
}
.design-layout-collage * {
    color: white !important;
}

 

image.thumb.png.d659ce69549871f59afd988267fb2c05.png

Edited by rasmusarentsen
Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

2 hours ago, rasmusarentsen said:

I' ve applied the following code to style an image. It works fine but I have 4 images in a row which I would like to style in the same fashion and preferably with the same code. I have tried to list the different block IDs with semicolon and with AND but doesen't work. What am I doing wrong?

/* banner collage image */
div#block-yui_3_17_2_1_1666098058627_3198 figcaption {
    width: 70%;
}
div#block-yui_3_17_2_1_1666098058627_3198 figcaption .image-card.sqs-dynamic-text-container {
    background: #f6c453;
    padding: 20px;
    width: 100% !important;
    margin-left: 0;
}
.design-layout-collage * {
    color: white !important;
}

 

image.thumb.png.d659ce69549871f59afd988267fb2c05.png

You can target multiple blocks by using the comma, not semicolon. However, there may be a simpler way to target all images. Please share the website link and password if applicable so I can check

Please give this a 👍 if it helps

Link to comment
On 10/19/2022 at 3:33 PM, rasmusarentsen said:

Which page are you referring to? I don't see them on homepage

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

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.