CSS code for colors

  • Unknown's avatar

    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: (visible only to logged in users)

  • 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.

  • Unknown's avatar

    Hi lizkarkoski,
    Thanks for your answer.

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

    Maybe is something like this :

    Les 3 chances

    Thanks for your help.

  • Hey there,

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

    Create a Page

    You can find the IDs on the edit page.

    Thanks!

  • Unknown's avatar

    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!

  • 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.

  • Unknown's avatar

    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

    Le bien-être par l’habitat


    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

    Le bien-être par l’habitat


    Aucune information n’est disponible pour cette page.

    After :
    Degrés Colorés

    Le bien-être par l’habitat


    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.

  • 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/

  • Unknown's avatar

    Thank you for all this help.

  • The topic ‘CSS code for colors’ is closed to new replies.