Jump to content

Apply CSS to Multiple poject pages

Go to solution Solved by tuanphan,

Recommended Posts

I want to apply this code on multiple pages, is there a way I can do that without keep looking for the page ID? 

CODE: 

 

@media only screen and (min-width: 641px) {
  #item-65d4d12a2e7bde1fca6600c6 {
    #page .page-section:nth-of-type(1) { 
      width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
    #page .page-section:nth-of-type(2) { 
      width: 60%;
      min-height: 100vh;
      align-items: center;
      float: right;
    }
    #page .page-section:nth-of-type(3) { 
       width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
  }
}

 

Link to comment
  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Edit that page > Add a Code Block (any where on page) > use this code

<style>
  @media only screen and (min-width: 768px) {
    #page .page-section:nth-of-type(1) { 
      width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
    #page .page-section:nth-of-type(2) { 
      width: 60%;
      min-height: 100vh;
      align-items: center;
      float: right;
    }
    #page .page-section:nth-of-type(3) { 
       width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
}
</style>

 

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
On 2/23/2024 at 5:22 PM, tuanphan said:

Edit that page > Add a Code Block (any where on page) > use this code

<style>
  @media only screen and (min-width: 768px) {
    #page .page-section:nth-of-type(1) { 
      width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
    #page .page-section:nth-of-type(2) { 
      width: 60%;
      min-height: 100vh;
      align-items: center;
      float: right;
    }
    #page .page-section:nth-of-type(3) { 
       width: 40%;
      min-height: 0vh;
      align-items: center;
      float: left;
    }
}
</style>

 

Thank you so much! it works!

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.