How do i add a search block in the header portion. Like we have a logo in the header on the left side , then I want a search block on the right side. On the standard Drupal themes this is possible , please tell how to insert search on the right side.

Comments

kunal981’s picture

Status: Active » Closed (fixed)

I did it :)

kunal981’s picture

Hello, I am not a designer just tried a few things and thankfully it worked for me.
1. I enabled the search module from admin .
2. Went to position the search block in the header , but Sky didn't have a header positioning.
3. So i made changes to page.tpl.php
4. Inside the div labeled as header i placed the code
if ($search_box):

print $search_box ;

endif;
5. This code basically tells that if search module is enabled place it here.
6. In style.css file i coded for the id ="search-floater" and code for it is
#search-floater {padding-bottom: 5px;position: relative;float: right;margin-top: 80px; margin-right:04px; width: 190px;z-index: 1; }
7. This is all i did Hopefully it will be helpful for u too.

Jacine’s picture

Category: task » feature

Hi kunal981,

The Sky theme doesn't feature a search box in the header as part of its design, but the way you added it yourself would be the right way to go about it. Just wanted to let you know that.

nxqamar’s picture

also make sure search box is enabled in theme configure settings. It wasted quite an hours for me.

pmathur01’s picture

Version: 5.x-3.0 » 6.x-3.4

Hi,
I am new to theming drupal. I did add the code in page.tpl but what are the steps that i need to add in style.css? Can someone elaborate..
thanks

paul555’s picture

subscribing