Site logo

[Resolved] Search results Background-Colour

Home Forums Support [Resolved] Search results Background-Colour

Home Forums Support Search results Background-Colour

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2499216
    Paul

    Hi There,

    I’d like to change the search results inner container background colour without effecting the background colour of other pages (I already have the following styles in place). Do you know which selector I could use to target the inner container (link in private info)

    /* Background colour on archives */
    body.archive {
        background-color: var(--grey-100);
    }
    
    /* Background content colour on archives */
    body.archive, body.archive #page {
        background-color: var(--grey-100)
    }
    
    /* Background colour on single posts */
    body.single-post {
        background-color: var(--white);
    }
    #2499257
    Ying
    Staff
    Customer Support

    Hi Paul,

    When you say inner container, do you mean the body background color (based on your CSS)?

    If so, you can use body.search-results

    #2499351
    Paul

    Hi Ying,

    Thanks for helping.

    No I meant the background colour behind the cards:

    The CSS below does what I want but it also effects the bg color on the single-posts page which I don’t want 🙂

    .one-container .site-content {
    	background-color: var(--grey-100);
    }

    Thanks

    #2499368
    Ying
    Staff
    Customer Support

    I see, you can use the class I mentioned to target the search results page:

    body.search-results .site-content {
        background-color: var(--grey-100);
    }
    #2499401
    Paul

    Perfect thank you Ying 🙂

    #2499645
    Ying
    Staff
    Customer Support

    You are welcome   🙂

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