Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Putting A Search Bar in the Header.
Old 06-28-2010, 12:21 PM Putting A Search Bar in the Header.
maximusminds's Avatar
Experienced Talker

Posts: 44
Name: ernie
Location: USA
Trades: 0
Hello people I have a quick question to ask, "How do you put a search bar in the header of your website". I made the header of my website in photoshop and the navigation bar in fireworks. I made the search engine bar in google custom search and now I have the code but I'm confused about how I can actually place it in the header. I've seen alot of sites with search engine bar in the headerbut I have no idea how to do it. Can someone please explain?
maximusminds is offline
Reply With Quote
View Public Profile Visit maximusminds's homepage!
 
 
Register now for full access!
Old 06-28-2010, 02:52 PM Re: Putting A Search Bar in the Header.
Banned

Posts: 24
Name: sdasdas adad
Trades: 0
1. create a div for header
<div id="header"></div>

2. Put this code between your head tag and change the width n height to the width and height of your header image
<style>
#header{
width:468px;
height:60px;
background-image:url(468x60-banner.jpg);
}
</style>

3.Inside your header div create another div called search
<div id="header">
<div id="search">
</div>

</div>

4. Add the style for your search div

#search{
width:50%;
float:right;
}

5.Place the custom search code between search div
<div id="search">
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('012390070684348 743025:d6xlxc4xzrm');
customSearchControl.setResultSetSize(google.search .Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />

</div>

6.Result

Last edited by ziawap; 06-28-2010 at 02:59 PM..
ziawap is offline
Reply With Quote
View Public Profile
 
Old 06-28-2010, 06:08 PM Re: Putting A Search Bar in the Header.
maximusminds's Avatar
Experienced Talker

Posts: 44
Name: ernie
Location: USA
Trades: 0
Thank you
maximusminds is offline
Reply With Quote
View Public Profile Visit maximusminds's homepage!
 
Reply     « Reply to Putting A Search Bar in the Header.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11779 seconds with 12 queries