CSS code for colors

  • Author
    Posts
  • #3243451

    thecreathor
    Member

    Hello,

    First one, I’m novice in CSS code.

    I want to change the colors of backgrounds and fonts but not have the same color on all the pages of the site.
    Actually, I’ve this code :

    .site-header {
    background-color: #edfafd;
    }

    .entry-title {
    color: #aed9da;
    }

    With this code, all the pages are with the same color.
    I would like a color for background on the “Accueil” page, another color for “Feng Shui”, etc.

    Theme : Spatial
    My site is https://degres-colores.com
    (but it’s actually in “private” mode)

    Thanks for your help.

    The blog I need help with is degres-colores.com.

    The blog I need help with is degres-colores.com.

    #3243855

    Hi –

    You can definitely do this. In order to make your background colors specific to certain pages, you need to find the page IDs. Adding these page IDs before the rest of the CSS will limit those changes to that particular page.

    We can help you find those if you aren’t sure how. Let me know all of the pages that you need help customizing.

    Go to the page, right click, choose Inspect. Search the CSS for page ID.

    #3244645

    thecreathor
    Member

    Hi lizkarkoski,
    Thanks for your answer.

    I’ve tried to find the CSS for page ID, but not found.

    Maybe is something like this :
    https://degres-colores.com/les-3-chances/

    Thanks for your help.

    #3244668

    Hey there,

    Here is our support page on how to find the page IDs:

    https://en.support.wordpress.com/pages/#how-to-find-the-page-id

    You can find the IDs on the edit page.

    Thanks!

    #3244711

    thecreathor
    Member

    Hello and thanks for your answer.

    Now, I know that the ID is : les-3-chances.

    Could you please show me an example of CSS code to edit the background color of the page : les-3-chances? And only for this page. And then, I can do the same for the others pages.

    Thanks a lot!

    #3244759

    supernovia
    Staff

    Hi @thecreathor. That’s actually the page “slug” which is a bit different. The page ID for this one is 129. You can find that via wordpress.com/pages — click on the page and either edit it or view its stats. The ID is a number and it will appear in the address bar at the top of your browser.

    With that number, try this code:

    .page-id-129 .site-header {
    background-color: #fdf0ed; 
    }
    
    .page-id-129 .entry-title {
    color: #faddd6
    }

    I want to note too, if you want all pages in a category to have one color that’s possible too. Let us know if you prefer to do that.

    #3244954

    thecreathor
    Member

    Hi @supernovia.
    Thank you so much. It works. I will do the same for all of the pages I want to change the color.

    May be can you help me about another problem.
    My site https://degres-colores.com is now in public mode.
    But when I search in Google (for example) “Degrés colorés” (name of the site), I can’t find my site. If I write “https://degres-colores.com”, it appears but like this :

    “Simplicité Feng Shui
    https://degres-colores.com/
    Aucune information n’est disponible pour cette page.”

    Simplicité Feng Shui was the name of the site when I start the site. After, I’ve changed the name for “Degrés Colorés”.

    How can I do to have this :
    Before :
    Simplicité Feng Shui
    https://degres-colores.com/
    Aucune information n’est disponible pour cette page.

    After :
    Degrés Colorés
    https://degres-colores.com/
    Créatrice d’espaces intelligents par le Feng Shui.

    If you can’t help me, I will post my question in another section.

    Thank for all.

    #3245016

    Hi –

    It takes about 6 weeks for Google to index a new site. The best thing to do during that waiting period is to keep working on your site. Continue to write new posts and publish them, using tags and categories.

    Some other tips to help you grow your audience can be found in these guides:

    https://en.support.wordpress.com/grow-your-community/
    https://en.support.wordpress.com/getting-more-views-and-traffic/

    #3245081

    thecreathor
    Member

    Thank you for all this help.

You must be logged in to reply to this topic.