2016-09-11, 10:29 PM
Hello,
so i've updated my search box, made it look like the one from mybb, but i have two questions now.
1. The icon doesn't do any action, you can only search by pressing "enter" right now, how could i make it search on icon click too?
2. The second thing i want to do is something like this:
(some ipb forum)
So instead of "All Content" and the dropdown, it should just expand that box and say "Advanced Search" which would link to "/search.php", if you click out of search box, the "Adv. Search" button should disappear again.
----------------------------------------------------------------------------------------
Now to the codes of my current search box:
header_quicksearch
Css
Thanks for any help, if you gonna help, please use the above code. I appreciate your help!
so i've updated my search box, made it look like the one from mybb, but i have two questions now.
1. The icon doesn't do any action, you can only search by pressing "enter" right now, how could i make it search on icon click too?
2. The second thing i want to do is something like this:
(some ipb forum)
So instead of "All Content" and the dropdown, it should just expand that box and say "Advanced Search" which would link to "/search.php", if you click out of search box, the "Adv. Search" button should disappear again.
----------------------------------------------------------------------------------------
Now to the codes of my current search box:
header_quicksearch
<form action="{$mybb->settings['bburl']}/search.php" method="post">
<fieldset id="search">
<input name="keywords" type="text" class="textbox" placeholder="Search Forums" />
<i class="fa fa-search search_icon"></i><input value="" type="submit" class="search_icon" />
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
</fieldset>
</form>
Css
#search input.textbox {
border-color: #A5A5A5;
margin: -10px 5px 0 0;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
line-height: 16px;
display: inline-block;
width: 200px;
}
.search_icon {
background: none;
cursor: pointer;
margin-left: -28px;
padding: 0;
border: 0;
display: inline-block;
color: #747474;
}
#search {
border: 0;
padding: 0;
margin: 0;
float: right;
display: block;
}
Thanks for any help, if you gonna help, please use the above code. I appreciate your help!