PDA

View Full Version : Changing location of the searchbar


Barzor
02-23-2018, 11:27 AM
Hi guys,

I tried to move the search bar from navbar to the location where the welcome_to_the_x usually belongs.
but the bar still shows op at the top right corner but is functional


my code:
<div id="pagetitle">
<h1>Vacatures zoeken</h1>
<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?do=process" method="post" id="navbar" class="navbar">
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
</div>

What am i doing wrong?

romaine
02-23-2018, 12:37 PM
Check CSS class is display none or your search bar is only appeared when it is clicked.

Barzor
02-23-2018, 01:25 PM
I can already see the search bar, but I don't know how to move it to the right place.

I need step by step guidement please

In Omnibus
02-23-2018, 01:51 PM
You're going to have to experiment with the exact number but try placing this in your additional.css template:

.globalsearch {
position:absolute;
width:180px;
right: 1680px;
top: 0px;
float: left;
clear: right;
text-align:right;
line-height: 1.0em;
display:block;
}

The right value is the one that may require adjustment.

Barzor
02-23-2018, 03:15 PM
Thanks for the effort.

I've learned a new thing, thanks for that. The issue now is that the seachbar moves out of position if I make the window of my browser smaller.