Jump to content

Syntax Error whenever I try to plug in this split page layout custom CSS

Recommended Posts

Site URL: https://www.jeannemarie.space/about-test

Per my About page on my in-progress site - I've been trying to create a split page layout effect (photo on one side of a section and copy content on the other side of the same section) and this code keeps giving me a syntax error every time I plug it in. I even tried saving the code with the syntax error and then adding my section ID to both of the bracket sections that ask for it and the syntax error still stays there and no changes appear to be made on my site. Please help!!!

 

@media only screen and (min-width: 640px){
[data section id] .section-background {
width: 50%
}
[data section id] .content-wrapper {
width: 50%;
margin-left: 50%!important;
}
}

Link to comment
  • Replies 3
  • Views 314
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Is this kind of what you are trying for?

908435397_ScreenShot2022-05-04at11_30_33AM.thumb.png.479fdcb1c6cd62b1102a4c9864144780.png

I threw in a background color on content so I could see the text.

@media only screen and ( min-width : 640px ) {

  [data-section-id="6272b4b85c358a18c66cfa26"] .section-background {
  
    width : 50%;
    
    }
    
  [data-section-id="6272b4b85c358a18c66cfa26"] .content-wrapper {
  
    background-color : red;
    margin-left : 50% !important;
    width : 50%;
    
    }
    
  }

You may want to use my Page Section First Blank Hide code so you don't have to deal with trying to fix the header.

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
12 minutes ago, jeanneemariee said:

I am still getting a syntax error, even after copying and pasting your direct css that you pasted

You are pasting into Design > Custom CSS?

When you paste in I find it helpful sometimes to put a couple of blank lines in at the top or bottom of the field to make sure I'm not pasting into the middle of some existing text.

You may also be interested in Will Myers' Split Screen Layout Design, if you're not already trying to follow it. 🙂

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

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.