css problem

Solved

css problem

abgekantet
New Member
4 0 0

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!

 

Accepted Solution (1)
Moeed
Shopify Partner
5323 1437 1723

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:

Moeed_0-1726246972362.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 6 (6)

Moeed
Shopify Partner
5323 1437 1723

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

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


abgekantet
New Member
4 0 0

www.abgekantet.de , how can i write u private?

 

Moeed
Shopify Partner
5323 1437 1723

Hey @abgekantet 

 

Can you share a screenshot exactly of what you wanna change the background color to private?

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


abgekantet
New Member
4 0 0

Kundensupport.png

Moeed
Shopify Partner
5323 1437 1723

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:

Moeed_0-1726246972362.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


abgekantet
New Member
4 0 0

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. Support.pngSupport1.pngSupport2.png