PDA

View Full Version : Space problem because of form tag


raghavan20
01-30-2005, 07:56 PM
Hi,

I am trying to include the google search within my homepage. but the form tag that wraps the google link and the text boxes add some extra space around itself making the table become larger in height.

if u c, the table main_menu and the table that enwraps google is of size 50 but now due to this effect it is larger than its actual size.

site:http://www50.brinkster.com/raghavan20/aspfiles/homepage.asp

Waiting for your valuable suggestions.

jbbrwcky
01-30-2005, 08:09 PM
Do you use css?

If so, try giving the form the padding and margin attributes set to 0.

Jbbrwcky

raghavan20
01-31-2005, 03:21 AM
Hi,thanks for your reply. I was a bit happy to see that the table has shrunk to some extent. I have tried to apply all the style properties...but I could see from Dreamweaver that the form by default has got some vacant space below the text box and submit button...

Pls help me sort this out..

jbbrwcky
01-31-2005, 07:08 AM
Ok try this.

Add margin-bottom:-5px; to the form, see if that will negate the little space at the bottom.

Jbbrwcky

raghavan20
01-31-2005, 11:07 AM
I am sorry to say that i have tried that even...which u can see from the link but it doesnot work

_Aerospace_Eng_
01-31-2005, 11:24 AM
place the opening form and closing form tags after between the opening tr and td tags
<table>
<tr>
<form>
<td>yourform</td>
</form>
</tr>
</table>

raghavan20
01-31-2005, 11:42 AM
I have tried wot u have said...its of no use...iam worried that i couldnot cheer you even now...anyway lets try if there is other way to work around

_Aerospace_Eng_
01-31-2005, 11:52 AM
well i saw that u have a height set to that td if u remove that height it will take away some space there will be about a 10px gap or so, u could also try adding cellspacing="0" and cellpadding="0" to that table that has the google form in it, or u can specify a font-size which will make the input box get smaller

_Aerospace_Eng_
01-31-2005, 11:58 AM
try this
<TABLE align="center" cellspacing="0" cellpadding="0" id="google" >
<tr>
<td>
<FORM method=GET action="http://www.google.co.uk/search" style="margin:0px;">
<IMG SRC="../images/google.gif" ALT="Google" border="0" align="absmiddle" >
<INPUT TYPE=text name=q size="25" maxlength="255" value="">
<INPUT type=submit name=btnG VALUE="Google Search">
<input type=hidden name=oe value=UTF-8>
<input type=hidden name=ie value=UTF-8>
</form>
</td></tr>
</TABLE>

raghavan20
01-31-2005, 01:49 PM
hi,,,you could c from there,,the code is same as that of your code..but we are surprised to c that its unwilling to change.

raghavan20
01-31-2005, 01:51 PM
i thought the link to the css file might be of help
http://www50.brinkster.com/raghavan20/cssfiles/basic.css

_Aerospace_Eng_
01-31-2005, 02:28 PM
use the attached css file for ur css. I got rid of all of the heights in your table because that attribute doesn't exist, it wont validate, i put the heights into the css and made the top margins for your left middle and right tables -20px

raghavan20
01-31-2005, 06:07 PM
Hi,,,thank you very much...finally the code worked; cheers to everyone who were involved in this.

Actually, I had to tweak a little bit but its your idea of negative margin which gave the breakthrough...

but as u can see,still the table in which google link is, is coming below the middle,top and right tables...we are not able to bring its size ,,i have jus made the main_menu bottom border=0;

fyi,,i have attached the altered css file..

U can c the link to c how our efforts hv come up

http://www50.brinkster.com/raghavan20/aspfiles/homepage.asp