Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just wondering how to add search box in primary menu?
I've just searching for the answer but this theme's cod quite different with other themes.
Thanks...
Comment | File | Size | Author |
---|---|---|---|
#1 | search-box.JPG | 12.77 KB | bedot |
Comments
Comment #1
bedot CreditAttribution: bedot commentedI've just figured it out a little by put a code below in page.tpl.php
if (isset($top_menu )) {
print theme('links', $top_menu , array('class' =>'links', 'id' => 'main-menu'))
print $search_box
}
and CSS
#search-theme-form {float: right;}
But I cannot centered it rightly. (refer attachment)
Someone please help me to align my search box correctly.
Comment #2
ollar CreditAttribution: ollar commentedHi. Add #search-theme-form input.form-text {
{width: 50%;}. If that wont help add #search-theme-form {float: right;} some fixed width like: #search-theme-form {float: right; width: 300px;}. Good luck.
Comment #3
ollar CreditAttribution: ollar commentedComment #4
restyler CreditAttribution: restyler commented