Jump to content

Combining data-section ids in CSS

Recommended Posts

I have code written for a testimonial slider, I want to use this on various pages.

At the moment I am repeating all of the code and just changing the data-section id as I can not work out how to combine 2 section ids eg

[data-section-id="5fa123bb822c8849697a5ef0"] .summary-title {
  margin-top: 30px !important;
  font-size: 22px !important;
  font-family: aktiv-grotesk;
  font-weight: 500;
  color: black !important;
  text-align: center !important;
  pointer-events: none;
}

 

How to I combine another section id

[data-section-id="5fc614ac08845d09245af5e7"]

so as not to repeat all of the code?

Thanks

 

 

Link to comment
  • Replies 4
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 1 year later...
On 12/6/2020 at 1:01 AM, tuanphan said:

data-section-id-1 .summary-title, data-section-id-2 .summary-title, data-section-id-3 .summary-title {}

#block-yui_3_17_2_1_1654722364804_11397 img {
  border-radius: 100%;
}

I would like to apply this code to multiple images as well. How do I combine the Ids without having to write the code everytime. 

Thanks.

Link to comment
1 hour ago, PapaJoe said:

How do I combine the Ids without having to write the code everytime.

As @tuanphan shows you separate the selectors with commas.

#block-yui_3_17_2_1_1654722364804_11397 img,
#block-yui_3_17_2_1_1654722364804_11398 img,
#block-yui_3_17_2_1_1654722364804_11399 img

  {
  
    border-radius : 100%;
	
	}

Note the last selector does not end with a comma.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
19 hours ago, creedon said:

As @tuanphan shows you separate the selectors with commas.

#block-yui_3_17_2_1_1654722364804_11397 img,
#block-yui_3_17_2_1_1654722364804_11398 img,
#block-yui_3_17_2_1_1654722364804_11399 img

  {
  
    border-radius : 100%;
	
	}

Note the last selector does not end with a comma.

Let us know how it goes.

Oh wow, thanks!

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.