Forum Moderators: open

Message Too Old, No Replies

Eleminate Table Space

Putting Google Search

         

asas111

7:11 am on Jan 2, 2008 (gmt 0)

10+ Year Member


This is killing me. It is either that I am doing it right, or it is just the way it is, and we can'd do anything about it.

Here is what is happening: I am trying to put a Google Search Box within a table, and I don't want any space between the search box and the table's upper and lower boarder. But no matter what i do, the table keeps leaving a space under the search box (no space from the top)

Please help me eliminate this space.

Here is the code for table along with the Google Search Box. Please help me, i am out of options.
Thanks a lot
-------------------------------------------

<table border="1" cellpadding="0" cellspacing="0" style="border-collaps: collapse" bordercolor="#111111" width="100%" height="0">
<tr>
<td width="100%" height="0">
<p align="center">
<font color="#FFFFFF">
<!--webbot bot="HTMLMarkup" startspan --><!-- Google CSE Search Box Begins -->
<form action="http://www.MyURL.net/search.htm" id="searchbox_#*$!#*$!#*$!X:ityshkaqmau">
<input type="hidden" name="cx" value="#*$!#*$!X:ityshkaqmau" />
<input type="hidden" name="cof" value="FORID:11" />
<input type="text" name="q" size="25" />
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_#*$!XX%3Aityshkaqmau"></script>
<!-- Google CSE Search Box Ends -->
<!--webbot bot="HTMLMarkup" endspan --></font></td>
</tr>
</table>

rocknbil

7:44 am on Jan 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Typo: border-collaps: collapse (unrelated)

Try this:

#mytable, #mytable form { margin:0; padding:0; }

<table id="mytable">
<tr>
<td>
.....
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_#*$!XX%3Aityshkaqmau"></script>
</td>
</tr>
</table>

This will remove all spaces from forms contained in mytable, whether they are generated by Javascript or not. You also have a starting paragraph tag there you don't need.

phranque

8:26 am on Jan 2, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



it might be worth trying to remove extra spaces and newlines between tags.
not sure why it was broken, but i've fixed spacing problems this way before:
</td></tr></table>