Site logo

[Support request] Change body background colour

Home Forums Support [Support request] Change body background colour

Home Forums Support Change body background colour

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2200823
    Sanu Kumar

    I am looking to change the background color for this page only: https://www.masteryblogging.com/ (its homepage). How can I do that?.

    I used this code but didn’t work:

    body.page-id-462 {
        background-color: #ffffff;
    }

    Note: 462 is my page id.

    #2200847
    David
    Staff
    Customer Support

    Hi there,

    try:

    body.home {
        background-color: #ffffff;
    }

    But there is also the Content Container background – and if you need to change that as well, then you add this:

    .home #page {
        background-color: #ffffff;
    }
    #2200878
    Sanu Kumar

    Tried this

    body.home {
        background-color: #ffffff;
    }

    but not working.

    #2200885
    David
    Staff
    Customer Support

    The body is already #ffffff;

    But i don’t see that CSS loading on your site:

    1. Move that CSS to the very top of your CSS.
    2. change the style to a different color so you can see the change eg. background-color: #ff0000;
    3. Clear your plugin and browser caches.

    #2200907
    Sanu Kumar

    It is now working. Thank you, David. Apart from this, I’m also looking to change the width of this page only. Help me with that?

    #2200921
    Ying
    Staff
    Customer Support

    You can use a layout element to set content container width:
    https://docs.generatepress.com/article/layout-element-overview/

    Choosefront page as location.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.