Zewel Posted November 2, 2021 Share Posted November 2, 2021 (edited) Site URL: https://www.kinestheticskills.com/ Hi, I cant figure out whats wrong on my CCS. I get a syntax error on line 1. If I delete it, it points on the following line etc. It is a picture I needed a URL for. I have uploaded many pictures for site backgrounds. Do you have any ideas on what to do? Thank you! The line is as following: https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/61603b23e842ed0479100cf3/1633696550032/OLY+background/IMG_5513.jpg Edited November 2, 2021 by Zewel spelling mistakes Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
Wolfsilon Posted November 2, 2021 Share Posted November 2, 2021 Could you share full code for the selector you're trying to edit the background for? Not the entire CSS but just the first - opening "{" - and closing "}" It would help to have context rather than looking at the url of the photo in question. Link to comment
Zewel Posted November 3, 2021 Author Share Posted November 3, 2021 Hi @Wolfsilon! Sure, thank you. This is what is used for the background on the Page setting under Advanced: <style type="text/css"> #outerWrapper { background-image: url("https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/61603b23e842ed0479100cf3/1633696550032/OLY+background.IMG_5513.jpg"); background-repeat: no-repeat; background-position: center center; background-size: cover; background-attachment: fixed; } </style> Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
Wolfsilon Posted November 3, 2021 Share Posted November 3, 2021 Are you trying to add a background image to just one section? Adding an image using the Advanced > Code Injection isn't normally how you do this unless you have direct control on the "#outerWrapper". Meaning, the outerWrapper doesn't exist without your code. But, in my experience, I believe it's built in. I'd consider just using Custom CSS and applying the background through that menu only. If you're saying that the code above is currently in your Custom CSS menu, you're likely running into the Syntax error because you cannot have "<style>" tags in this menu and you might just need to remove both of them and leave the innermost CSS. Zewel 1 Link to comment
Zewel Posted November 6, 2021 Author Share Posted November 6, 2021 On 11/3/2021 at 11:21 PM, Wolfsilon said: Are you trying to add a background image to just one section? Adding an image using the Advanced > Code Injection isn't normally how you do this unless you have direct control on the "#outerWrapper". Meaning, the outerWrapper doesn't exist without your code. But, in my experience, I believe it's built in. I'd consider just using Custom CSS and applying the background through that menu only. If you're saying that the code above is currently in your Custom CSS menu, you're likely running into the Syntax error because you cannot have "<style>" tags in this menu and you might just need to remove both of them and leave the innermost CSS. Hi @Wolfsilon and thanks for reply! I am adding background image to every page I have using the above mentioned code in Advanced >code injection. So it is not in my custom CSS menu. There I only upload those pictures used in background. If I understand correct I shouldn't be using the Advanced section for it? Any idea what the issue can be? Thank you! Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
Zewel Posted August 23, 2022 Author Share Posted August 23, 2022 Hello could someone please help me on this? Im using Aviator, Trombone Shorty theme. My page https://www.kinestheticskills.com/lubomirkafonek Each photo on my site is stretched and when scrolling down the the photo is scrolling with the page instead of being static. I havent changed anything in coding. But it says Syntax Error on line 1. Any idea what to do? What I used in Page Settings/ Advanced : on each page is this: <style type="text/css"> #outerWrapper { background-image: url("http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57cd4600c534a5dcc4369d8b/1473070599024/1.jpg"); background-repeat: no-repeat; background-position: center center; background-size: cover; background-attachment: fixed; } </style> Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
creedon Posted August 24, 2022 Share Posted August 24, 2022 9 hours ago, Zewel said: But it says Syntax Error on line 1. Page Settings > Advanced > Page Header Code Injection don't report syntax errors. It sounds like you are talking about Design > Custom CSS. If I had to guess you've put a <style> tag in Design > Custom CSS. Design > Custom. CSS doesn't understand HTML tags. Zewel 1 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
Zewel Posted August 24, 2022 Author Share Posted August 24, 2022 Hello Creedon and thank you very much for quick reply!!! Yes you are right, it is in Design>Custom CSS where I get to see the syntax error ,sorry for the unclear description. I have used the <style> tag only in Page Settings/ Advanced. Is that wrong? Below is what I have in Design>Custom CSS : just links to photos and one code in the end.. Thank you for your time! https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/61603b23e842ed0479100cf3/1633696550032/OLY+background/IMG_5513.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57eb7de92994cae67c07014e/1475050985807/13606868_1006971339399233_2773698822222552557_n.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57ea4f18f7e0ab1a344b0807/1474973465838/background+contact.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57ea4f18f7e0ab1a344b0807/1474973465838/background+contact.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57dd5318725e2573714c3bb4/1474122524067/IMG_7185.JPG http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57daa0ce59cc6819438f71f0/1473945806585/13718568_1007876795975354_1319907471751798249_n.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57da9dd303596e21e42a1119/1473945044375/Movement+classes+course.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57d6e3a1f7e0ab29571987a4/1473700769547/13669023_1007876539308713_8875973563280660084_n.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57d6dd8620099e32e85a7e26/1473699207274/13754107_1006970942732606_1242551558740232710_n.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57cd9f7715d5db35c681502a/1473093496227/profile+picture+skype+KS.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57cda2d5440243f4dee0b6f6/1473094360912/Workshops.JPG https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/6160a2d5678246069ad471d1/1633723098322/Squat+workshop+new.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/6160a536678246069ad4a6b7/1633723706072/Profile+photo.jpg http://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/57d5c048725e254062261206/1473626192637/Worskhops+background.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/6160b91e34ef2b52e3c4942a/1633728803443/IMG_5200.jpg https://static1.squarespace.com/static/57c0aaa8bebafbec82d0fbfe/t/6160bf8ddf20482dec0ec0e5/1633730449228/IMG_5351.jpg 1. #page-title { 2. display: none; } #title-area h1 {display: none !important;} Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
Zewel Posted August 24, 2022 Author Share Posted August 24, 2022 I just tried to open my web at Safari browser and there the background is just normal.. While at Google Chrome it makes background stretched..Could it be because of CSS coding? Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
creedon Posted August 24, 2022 Share Posted August 24, 2022 If your CSS field looks like the following, starting with an image URL, that is not CSS syntax. That is why you are getting a syntax error on line 1. The image URLs should be removed. Also there are syntax errors in the rule-sets. It should look like the following. #page-title { display : none; } #title-area h1 { display : none !important; } Zewel 1 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
Zewel Posted August 25, 2022 Author Share Posted August 25, 2022 Hello Creedon! Problem solved! I had no idea the photo links can/should be removed once I get the URLs for my backgrounds photos. I corrected the rule-sets and it works all fine now. Thank you very much for your help! How can I reward you:)! creedon 1 Fysiotherapist bored of Wordpress hoping Squarespace will make a huge difference for his freelance job. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment