PDA

View Full Version : Google text box won't move to top of page


misstheresa2009
01-18-2010, 01:10 PM
Hi everybody,

I just inserted a google search box. Everything works fine except that Dreamweaver won't let me put the text box at the top of the page. I tried aligning, changing margins, padding, etc. and nothing is working.

BTW, I put the google search box within a table. Could this be the problem?

gentleone
01-18-2010, 01:19 PM
BTW, I put the google search box within a table. Could this be the problem?

Could be! Link or code, please!

misstheresa2009
01-18-2010, 01:21 PM
<table width="780" border="0" cellpadding="0">
<tr>
<td width="330" height="147"><img src="DeesLogo_webversion copy copy.jpg" width="206" height="138" /></td>
<td width="228">&nbsp;</td>
<td width="214"><form action="http://www.google.com/cse" name="cse-search-box" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="010037101181174740973:6difdkdmsde" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="ie2" value="UTF-8" />
<br />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>
&nbsp;</td>

gentleone
01-18-2010, 02:35 PM
Well... in the first place tables using for layout is not the way to go, becuase you will ran in more issues after this one. But... try the following:

change this:
<td width="214"><form action="http://www.google.com/cse" name="cse-search-box" id="cse-search-box">

to this:
<td width="214" align="left" valign="top"><form action="http://www.google.com/cse" name="cse-search-box" id="cse-search-box">


I would recommend that you gonna try to get a grasp on laying out your pages with div's and CSS... saves you a lot of hassle.

misstheresa2009
01-18-2010, 02:42 PM
gentleone,

It worked! Thank you so much! And in the future I will try to use divs instead of tables.

You have a great day!