Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search Box

422422 MVP
edited December 2011 in Vanilla 2.0 - 2.8

I note from src code, that you wrap input and button in blank div.

Like:

<div>
<input id="Form_Search" class="InputBox" type="text" placeholder="Search Forums" value="hello" name="Search" data-default="100" style="display: inline-block; width: 100px;">
<input id="Form_Go" class="Button" type="submit" value="Go">
</div>

Could you point me to the right area to change this, so that we may add class/id.

The reason is, we are re doing search ( top header menu ) and search for the search page. But if we change styling for eitehr they have an effect on other.

For now, we can only change style using body id, like:
#vanilla_discussions_index .Search div

And

#dashboard_search_index .Search div

Unfortunately this isnt enough to safely style both independantly of each other. So all I need to know, is where the hook for <div> is that wraps input elements, within form.

There was an error rendering this rich post.

Best Answer

  • ToddTodd Vanilla Staff
    Answer ✓

    The form object is what puts that naked div in every form which is a legacy thing and difficult to change at this point. I think your fix is perfectly adequate.

Answers

  • Managed to fluff a fix, by using:
    #vanilla_discussions_index .Search div, #dashboard_search_index .Search div

    Not sure this is very elegant

    There was an error rendering this rich post.

  • ToddTodd Vanilla Staff
    Answer ✓

    The form object is what puts that naked div in every form which is a legacy thing and difficult to change at this point. I think your fix is perfectly adequate.

  • Apologies for all the questions @Todd I dont wish to be a pain in the ass. Still learning Vanilla, and eager. Cheers for the reply, and we will go with the code I did.

    Ste

    There was an error rendering this rich post.

  • candymancandyman ✭✭
    edited December 2011

    422 said:
    Apologies for all the questions @Todd I dont wish to be a pain in the ass.

    Don't worry, compared to me you're an absolute beginner... ;)

  • ToddTodd Vanilla Staff

    No worries, both of you :)

Sign In or Register to comment.