CSS for search results pages in Forefront theme

  • Unknown's avatar

    I’m almost done customizing my site using the Forefront theme and have just noticed that CSS is not being applied to search pages. More specifically, there appears to be a problem with adjustments that I’ve made to the site width:

    .site-main {
    padding: 0 30px 2px;
    }

    This CSS does not appear to be applied to search pages. Any help that anyone can offer would be most welcome. Thanks.

    The blog I need help with is: (visible only to logged in users)

  • Hmm, on the search result pages, I’m actually seeing it applied. Here’s an example page, where the code you gave works.

    This same code doesn’t seem to work on other pages, though.

    Regardless, try this, should work on all:

    .hfeed .site-main {
        padding: 0 30px 2px;
    }

    If it doesn’t give a try to this:

    .hfeed .site-main {
        padding: 0 30px 2px !important;
    }
  • Unknown's avatar

    Thank you for this. I’ve just put in the first block of code (without ‘!important’) and the result has been odd:

    1) The hero image on the homepage has ‘shrunk’, so that it no longer sits full width on the page (but I notice that featured images on all other pages look fine);

    2) The search results page (the example you gave) still doesn’t look right.

    Any thoughts on that?

  • 1) The hero image on the homepage has ‘shrunk’, so that it no longer sits full width on the page (but I notice that featured images on all other pages look fine);

    Yes, because that’s what the code is supposed to do. It adds 32px horizontal padding to the content area, that image is part of it.

    2) The search results page (the example you gave) still doesn’t look right.

    If you can describe how you want the search page to look, perhaps a screenshot, I’ll try to get a code for it. :)

  • Unknown's avatar

    Looks like we’ve got it sorted out now, we had some duplicate code in place that threw off the whole thing. Thanks.

  • The topic ‘CSS for search results pages in Forefront theme’ is closed to new replies.