1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Design issue: Background of forum search

Discussion in 'XenForo Questions and Support' started by twollert, Nov 29, 2011.

  1. twollert

    twollert Active Member

    How can I change the background color of the forum search form, WITHOUT setting the value for .xenForm in the EXTRA.css? By default it's transparent, but I want it to be white:

    searchform.png

    (Can't change the value of .xenForm because it's also controlling the login bar.)

    Thanks for your help!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the search_form_post template and add your own class/inline styling to it.
     
  3. twollert

    twollert Active Member

    In the search_form_post template I tried to add

    Code:
    background="#ffffff"
    to the FORM tag. But that didn't work. Any ideas?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use this in EXTRA.css:

    Code:
    .search_form .xenForm
    {
    	background-color: green;
    }
    
    By using the content template "search_form" you target the search page only.
     
  5. twollert

    twollert Active Member

    Thanks, Jake! I tried that with the default style, but

    Code:
    .search_form .xenForm
    {
        background-color: green;
    }
    didn't work at all. That's strange!

    The code

    Code:
    .xenForm
    {
    background-color: green;
    }
    is changing the background color of the search and login form to green.

    Any other ideas?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    There are three search templates: search_form, search_form_post, search_form_profile_post

    Try adding it for all three so it works no matter which tab is selected.
     
    Jake Bunce likes this.
  7. twollert

    twollert Active Member

    Perfect - that's it! search_form was only for one tab.

    Code:
    .search_form .xenForm
    {
        background-color: green;
    }
     
    .search_form_post .xenForm
    {
        background-color: green;
    }
     
    .search_form_profile_post .xenForm
    {
        background-color: green;
    }
    works great. Thank you! (y)
     

Share This Page