Jump to content

Syntax error in my Custom Css

Recommended Posts

Site URL: https://theglrynetwork.com/

I keep getting a syntax error on line 2.

However, when I put an open and closing bracket on line 1, the syntax error disappears but after I click save there are no changes made to

the background of my welcome page. I'm using the Brine template.

#welcome
background: linear-gradient(196deg, #fed9df, #e3ffb7, #dad6fd, #f4e4d9, #d3e4e8, #b8ecff);
background-size: 1200% 1200%;

animation: AnimationName 32s ease infinite;

@keyframes AnimationName {
    0%{background-position:0% 54%}
    50%{background-position:100% 47%}
    100%{background-position:0% 54%}
}
 

 

Edited by glorynetwork
mistake in title
Link to comment
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

This is the CSS in the Custom CSS box in the attached picture.

However this is the full CSS:

background: linear-gradient(270deg, #fed9df, #f4e4d9, #dad6fd, #e3ffb7, #d3e4e8, #b8ecff);

background-size: 1200% 1200%;

-webkit-animation: AnimationName 30s ease infinite;

-moz-animation: AnimationName 30s ease infinite;

-o-animation: AnimationName 30s ease infinite;

animation: AnimationName 30s ease infinite;

@-webkit-keyframes AnimationName {

    0%{background-position:0% 50%}

    50%{background-position:100% 50%}

    100%{background-position:0% 50%}

}

@-moz-keyframes AnimationName {

    0%{background-position:0% 50%}

    50%{background-position:100% 50%}

    100%{background-position:0% 50%}

}

@-o-keyframes AnimationName {

    0%{background-position:0% 50%}

    50%{background-position:100% 50%}

    100%{background-position:0% 50%}

}

@keyframes AnimationName {

    0%{background-position:0% 50%}

    50%{background-position:100% 50%}

    100%{background-position:0% 50%}

}

Im not sure if i need all of it?

 

 

Screenshot 2020-04-25 at 23.10.44.png

Link to comment

Hi, your code is incorrrect. Where did you get this code?

background: linear-gradient(270deg, #fed9df, #f4e4d9, #dad6fd, #e3ffb7, #d3e4e8, #b8ecff);

background-size: 1200% 1200%;

-webkit-animation: AnimationName 30s ease infinite;

-moz-animation: AnimationName 30s ease infinite;

-o-animation: AnimationName 30s ease infinite;

animation: AnimationName 30s ease infinite;

The CSS should be (just an example)

CSS-Class/ID-Name {
  background: linear-gradient(270deg, #fed9df, #f4e4d9, #dad6fd, #e3ffb7, #d3e4e8, #b8ecff);
  background-size: 1200% 1200%;
  -webkit-animation: AnimationName 30s ease infinite;
  -moz-animation: AnimationName 30s ease infinite;
  -o-animation: AnimationName 30s ease infinite;
  animation: AnimationName 30s ease infinite;
}

 

Edited by tuanphan
typo

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

So I've copied the CSS code you corrected with the ID name: 

#welcome{
  background: linear-gradient(270deg, #fed9df, #f4e4d9, #dad6fd, #e3ffb7, #d3e4e8, #b8ecff);
  background-size: 1200% 1200%;
  -webkit-animation: AnimationName 30s ease infinite;
  -moz-animation: AnimationName 30s ease infinite;
  -o-animation: AnimationName 30s ease infinite;
  animation: AnimationName 30s ease infinite;
}

Im no longer getting syntax errors but I'm not seeing any changes.

Link to comment
14 hours ago, glorynetwork said:

So I've copied the CSS code you corrected with the ID name: 

#welcome{
  background: linear-gradient(270deg, #fed9df, #f4e4d9, #dad6fd, #e3ffb7, #d3e4e8, #b8ecff);
  background-size: 1200% 1200%;
  -webkit-animation: AnimationName 30s ease infinite;
  -moz-animation: AnimationName 30s ease infinite;
  -o-animation: AnimationName 30s ease infinite;
  animation: AnimationName 30s ease infinite;
}

Im no longer getting syntax errors but I'm not seeing any changes.

Which element is the code affecting on the website? and you're sure that id is right for the above element? If you are not sure, can you share the url + element you want to apply code?

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.