Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Syntax error in my Custom Css


glorynetwork

Question

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 post
  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

8 answers to this question

Recommended Posts

  • 0

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 post
  • 0

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
Link to post
  • 0

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 post
  • 0
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?

Link to post
  • 0

It's the home page  of my website that I am trying to change.  Well using the squarespace  ID finder, I was able to get the right ID and  finally managed to fix it! The first ID was actually incorrect, thanks for all your help! 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...