[Support request] Change background color on only one page

Home Forums Support [Support request] Change background color on only one page

Home Forums Support Change background color on only one page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #941376
    Nele

    Hi there,
    I would like to change the background color on only one page of my website? is this possible, and how exactly :-)?

    kind regards from Belgium
    Nele

    #941522
    David
    Staff
    Customer Support

    Hi there,

    you would need some CSS that targets that specific page e.g

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

    Replace the XXXX with the ID of the page you want to target. You can find the ID by editing the page in the WP Editor and inspecting the URL.

    #2109671
    Charles

    So I tried this code on my page https://gettysburgconnection.org/support-our-businesses-february-is-i-love-local-month-in-adams-county/

    body.page-id-50184 {
    background-color: #FAE0FD;
    }

    I see the code on the page but the background color hasn’t changed.

    Thanks.

    #2109694
    David
    Staff
    Customer Support

    Hi there,

    its a post – which uses a different class name – try this:

    body.postid-50184 {
        background-color: #FAE0FD;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.