Jump to content

Custom Code is not applied on the live site

Recommended Posts

Hey folks,
I need your kind help in one of the serious matter that I am currently facing.
If you see this website:
https://www.briancash.work/
Password: TestWebsite22

Its almost messed up on the live website because the Custom Css that I am using is not being applied on the live website.
It was working fine few days ago but then stopped working.
But when I open the website editor and then open the custom css panel, it suddenly applies css to the website.

Is anyone else facing the same issue? I am also attaching the screenshots of live website vs the editor.

Thank you in advance!image.thumb.png.3f2776f1189b8f3a3b69df2c772a9b62.pngimage.thumb.png.fbdaf85e2ae58fefca2fc7df030dcdec.png

Link to comment

I suspect you have syntax errors in your Custom CSS.

ScreenShot2023-09-05at12_53_58PM.thumb.png.f232aa0a18234aaff21b07dc837ca6b8.png

You are getting different renderings because things work differently in the site editor than they do when the site is viewed from the outside world.

Fix the syntax errors and things should get better and be more consistent.

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
4 minutes ago, creedon said:

I suspect you have syntax errors in your Custom CSS.

ScreenShot2023-09-05at12_53_58PM.thumb.png.f232aa0a18234aaff21b07dc837ca6b8.png

You are getting different renderings because things work differently in the site editor than they do when the site is viewed from the outside world.

Fix the syntax errors and things should get better and be more consistent.

Thank you Sir for your reply!
I appreciate your detailed response.

But can you please guide me what kind of syntax errors the above code contains that you shared?
If you can share with me just one example to give me an idea, i would be grateful.image.thumb.png.9971ad24948bf399f17769f044d6b40d.png

Thanks so much!

Link to comment
On 9/6/2023 at 3:05 AM, NajiyyaYounas said:

Thank you Sir for your reply!
I appreciate your detailed response.

But can you please guide me what kind of syntax errors the above code contains that you shared?
If you can share with me just one example to give me an idea, i would be grateful.image.thumb.png.9971ad24948bf399f17769f044d6b40d.png

Thanks so much!

I see line 450 - 461 is fine, maybe problem from another line. Can you post all code?

Choose this then paste code, we can see it easier

image.png.fa5dc35cc534e6da984b1e311301a315.png

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
  • 1 year later...

I have an issue where the CSS code works on the Squarespace site editor but not on the live site and I can't figure out why. It pertains to 2 specific pages:

  • The front page where there are 5 image/list items that supposed to gradually transition and rotate 180 degrees and upward when hovering over them.
  • On the leadership page, the image/list items is supposed to gradually transition to move up upon hover but with no 180 degree rotation.

Both of these elements work when in edit mode, but on the live site, this doesn't work. On the front page, the items instantaneously rotates 180 degrees and upward (no gradual transition). On the leadership page, the items instantaneously moves upward instead of a gradual transition.

Also, the buttons in the list items, they are black colored buttons that are supposed to transition to turn red on hover. This works on the Squarespace site editor but not on the live site. Instead, the buttons turn light blue. 

Front page:

Leadership page:

Haven't been able to solve these issues, so any help is much appreciated!

Edited by Squaredspace
Link to comment

@tuanphan Thank you so much, that resolved the revolving image/list item issue! 

For the buttons in the list items on the home page, would you have a solution to keep buttons transitioning to turn red on hover instead of turning light blue? The buttons in the list items under the Leadership page turn red on hover, so that's okay.

I pinpointed where the buttons are using the browser Inspect, but not quite sure what code to use or how or where to implement it 🤷‍♂️.

a..list-item-content_button.sqs-block-button-element.sqs-block-button-element--medium.sqs-button-element--primary

I know there's more to it, but would it be something similar to this:

.sqs-block-button-element  {
 primary.sqs-block-button-element:hover {
    color: #C80000;
}
      }

Edited by Squaredspace
Link to comment
On 10/10/2024 at 3:10 AM, Squaredspace said:

@tuanphan Thank you so much, that resolved the revolving image/list item issue! 

For the buttons in the list items on the home page, would you have a solution to keep buttons transitioning to turn red on hover instead of turning light blue? The buttons in the list items under the Leadership page turn red on hover, so that's okay.

I pinpointed where the buttons are using the browser Inspect, but not quite sure what code to use or how or where to implement it 🤷‍♂️.

a..list-item-content_button.sqs-block-button-element.sqs-block-button-element--medium.sqs-button-element--primary

I know there's more to it, but would it be something similar to this:

.sqs-block-button-element  {
 primary.sqs-block-button-element:hover {
    color: #C80000;
}
      }

You can use this to Custom CSS box

body.homepage a.list-item-content__button.sqs-block-button-element.sqs-block-button-element--medium.sqs-button-element--primary:hover {
    background-color: #f00 !important;
}

image.png.8bff1363b7ac89f6deafcd8e4ffb3e4c.png

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

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.