problem styling the search box  Bottom

  • I use a theme that includes a search box:

    Code

    <!--[pnml name="_SEARCH" assign="search_label"]-->
    <!--[search active="faqs, stories" label=$search_label class="pnsearchform"]-->


    which outputs the following:

    Code

    <form class="pnsearchform" action="index.php" method="post">
     <div>
      <input type="hidden" name="name" value="Search" />
      <input type="hidden" name="action" value="search" />

      <input type="hidden" name="overview" value="1" />
      <input type="hidden" name="bool" value="AND" />
      <input type="hidden" name="active_faqs" value="1" />
      <input type="hidden" name="active_stories" value="1" />
      <label for="search_xte_plugin">Search</label>
      <input id="search_xte_plugin" type="text" name="q" value="" size="12" tabindex="0"  />
     </div>
    </form>


    the problem is, the search box won't listen to styles.

    I declared

    Code

    //searchbutt
    '.pnsearchform { '.$colors['link'].';'."\n".
    'font-size:14px;'."\n".
    'font-weight: bold;'."\n".
    '}'."\n".


    While the font size and weight correctly conforms to the set values, the text color defaults to text1, regardless if I hardcode it or whatever.

    There seems to be something overriding my styling of pnsearchform.

    So... how can I change the textcolor of the label of the searchbox?
    (P.S. adding a style for label didn't solve the problem either)


    Thanks for your help.
  • Using Firebug, you can see where the override is coming from.
  • Ok, I used Firebug, but it didn't help me.

    it says my .pnsearchform

    is being overridden by a declaration 'inherited from div'
    for
    div,p,td,th,input,textarea,form,select,font

    and I have no idea why cry

    (the div declaration comes from the same CSS file the .pnsearchform is in).



    edited by: manarak, May 25, 2009 - 07:38 AM
  • I think I understand now.

    Inside the form with class pnsearchform, there is a nested div!

    like that:

    Code

    <form class="xyz"><div></div></form>


    but I can't declare a particular class for that div, it is generated by the template plugin!
    so... what now?



    edited by: manarak, May 25, 2009 - 07:43 AM
  • style it like so:

    Code

    form.xyz div {
      /* all my styles here */
    }
  • VICTORY!

    Thank you very much Craigh.
    I have learned something in the process too.
  • you're welcome. glad I could help icon_biggrin icon_biggrin

This list is based on users active over the last 60 minutes.