Jump to content

How to add multiple section IDs in a row in CSS in 7.0? Differences between adding CSS into Custom CSS or header of a page.

Recommended Posts

Hi, I'm trying to change the height of some of the index sections on mobile in Squarespace 7.0. I'm still very enw to CSS but I'm ahving a blast so far! So excuse me if my questions are trivial.

I want to add the CSS in the header of the INDEX Sexction, or even better inject it in the page header of each specific page section instead of the whole index section. I do not wan to add this to Design > Custom CSS.

For now, the only way I was able to do this was if I add this code into the header of the INDEX header:

section#main-image-mobile, section#large-image-cabin {
  min-height: 0 !important;
}

However, I have multiple sections that I would like to apply this to.

QUESTION 1:

How can I add multiple section IDs at the same time to be affected by some CSS? I know that if I want to apply some code to multiple blocks, I just put a comma between the block IDs and I can add as many as I want. But adding a comma between the section IDs does not work,

section#main-image-mobile, section#large-image-cabin {
  min-height: 0 !important;
}

so instead I am having to copy the whole code for each section like this.

 

section#main-image-mobile {
  min-height: 0 !important;
}

section#large-image-cabin {
  min-height: 0 !important;
}

QUESTION2:

When I try adding the same code into the actual section called #main-image-mobile (not the index), this doesn't affect anything. Could anyone please explain why?

 

I tried adding:

section#main-image-mobile {
  min-height: 0 !important;
}

or without the "section"

#main-image-mobile {
  min-height: 0 !important;
}

 

QUESTION 3:

When do I have to add "section" before the section ID? Always or not? Because it seems that when I add it in Design > Custom CSS, I don't have to add it, but if I add it  to the header of said page, it won't work unless I add the "section" prefix. Could someone pleae explain why that is so?

Thank you very much.

The page is for mobile and you can find it here

xcrafts.com

Edited by mrkmmvl
Link to comment
  • mrkmmvl changed the title to How to add multiple section IDs in a row in CSS in 7.0? Differences between adding CSS into Custom CSS or header of a page.
  • Replies 1
  • Views 364
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.