Jump to content

How do I put the drop-down menu in the search bar?


Chrisj

Recommended Posts

I saw a website that had the drop-down menu in the search bar (on the right - where it shows "all Images" and a down arrow) - see SearchBar1 image attached. My current one on my web page looks like SearchBar2 image attached.

I'm looking for guidance on how to change my code so that the drop-down menu looks more like SearchBar1 image. Any help will be appreciated. Here's my current code (which works successfully):

<form method="get" action="../search.php" name="myForm" />
<select size="1" name="type" class="dropdown_box" />
<a href="#" class="dropdowmSubstitute" role="button">
<span class="textContainer">
<span class="dropdownText">
<option value="any string here">ALL</option>
</span>
</span>
<span class="arrowContainer">
<span class="dropdownArrow">▼</span>
</span>
</a>
<option value="1">Choice1</option>
<option value="2">Choice2</option>
</select>
<input autocomplete="off" id="keyword" name="keyword" value="SEARCH WORDS" onfocus="if (this.value=='SEARCH WORDS') {this.value=''; this.style.color='#696969';}" onclick="clickclear(this, 'Search [var.site_name]')" onblur="clickrecall(this,'Search [var.site_name]')" value="" />
<input type="submit" value="VIEW"/>
</form>

post-20454-0-78832700-1441382273_thumb.png

post-20454-0-15679000-1441382286_thumb.png

Link to comment
Share on other sites

Thanks for your reply. Much appreciated. Although I'm completely clear on what you're suggesting? I'm sure I can "hide the current border of the drop-down list, but I'm not completely clear on the rest of your suggestion.

Would you mind providing an example using my code?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.