Personalized checkout and custom promotions with Shopify Scripts
Hello everyone,
I have a problem and would like to create a black background throughout the Dawn theme. However, it fails with "pages" as shown in the following image. Wherever I can select "pages," I cannot change the "schema" as usual. I used the following code:
{
background-color: #000000; /* Black */
}
h1, h2, h3, h4, h5, h6, p {
color: #FFFFFF; /* White */
}
{
color: #CCCCCC; /* Light gray */
text-decoration: none;
}
The code is recognized to make the background black and the text white. However, I cannot save it afterward and receive the following error message: "Session in online store editor cannot be published."
Can someone help me and possibly adjust my code so that I can save it? I would be extremely grateful if I could complete it as soon as possible.
Thank you very much and have a nice weekend!
Solved! Go to the solution
This is an accepted solution.
Hey @abgekantet
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if template == 'page' %}
<style>
main#MainContent {
background: black !important;
color: white !important;
}
.main-page-title {
color: white !important;
}
</style>
{% endif %}
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Hey @abgekantet
Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Best Regards,
Moeed
Hey @abgekantet
Can you share a screenshot exactly of what you wanna change the background color to private?
Best Regards,
Moeed
This is an accepted solution.
Hey @abgekantet
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if template == 'page' %}
<style>
main#MainContent {
background: black !important;
color: white !important;
}
.main-page-title {
color: white !important;
}
</style>
{% endif %}
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Thank you for your help. Could you also assist me with the following? In the last image, I cannot see the "Log in here" link because it is also black and unreadable.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024