Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to remove the spacing between <form> tag?

Reply
Thread Tools

How to remove the spacing between <form> tag?

 
 
kaiwing18@gmail.com
Guest
Posts: n/a
 
      10-17-2007
Hello all,

I have the following simple html how can I display the second table
content like the first one. As i have add the <form>payment</form>
tag. Any method to remove the spacing.


<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>[history | payment]</td>
</tr>
</table>

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>[history | <form>payment</form>]</td>
</tr>
</table>

Thx,

Wing

 
Reply With Quote
 
 
 
 
Chaddy2222
Guest
Posts: n/a
 
      10-17-2007

(E-Mail Removed) wrote:
> Hello all,
>
> I have the following simple html how can I display the second table
> content like the first one. As i have add the <form>payment</form>
> tag. Any method to remove the spacing.
>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | payment]</td>
> </tr>
> </table>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
>

Learn some better coding from:
http://www.htmldog.com
--
Regards Chad. http://freewebdesign.awardspace.biz

 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      10-17-2007
Well bust mah britches and call me cheeky, on Wed, 17 Oct 2007 13:09:32 GMT
scribed:

> Hello all,
>
> I have the following simple html how can I display the second table
> content like the first one. As i have add the <form>payment</form>
> tag. Any method to remove the spacing.
>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | payment]</td>
> </tr>
> </table>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | <form>payment</form>]</td>
> </tr>
> </table>
>
> Thx,
>
> Wing


Set margins and padding to 0 on the form. If the line feeds are a problem,
it _may_ be possible to render the form as inline (display:inline.

--
Neredbojias
Half lies are worth twice as much as whole lies.
 
Reply With Quote
 
walosaw@yahoo.com.au
Guest
Posts: n/a
 
      10-18-2007
This is a quck fix though it would be better to have all your style
sheet code in a seperate css file
change
<td>[history | <form>payment</form>]</td>
to
<td>[history | <form style="display:inline">payment</form>]</td>

Cheers

 
Reply With Quote
 
John
Guest
Posts: n/a
 
      10-18-2007
On Oct 17, 11:09 pm, (E-Mail Removed) wrote:
> Hello all,
>
> I have the following simple html how can I display the second table
> content like the first one. As i have add the <form>payment</form>
> tag. Any method to remove the spacing.
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | payment]</td>
> </tr>
> </table>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | <form>payment</form>]</td>
> </tr>
> </table>
>
> Thx,
>
> Wing


This is a quck fix though it would be better to have all your style
sheet code in a seperate css file
change
<td>[history | <form>payment</form>]</td>
to
<td>[history | <form style="display:inline">payment</form>]</td>

Cheers

 
Reply With Quote
 
Steve Swift
Guest
Posts: n/a
 
      10-18-2007
> change
> <td>[history | <form>payment</form>]</td>
> to
> <td>[history | <form style="display:inline">payment</form>]</td>


I've lost the beginning of this thread, so don't know the original question.

Whenever I'm using a <FORM> inside a <TABLE> I always place the <FORM>
inside the <TABLE> tag but *outside* any <TD></TD> or <TR></TR> constructs.
I discovered (by trial and error) that placing the <FORM> inside one of
your cells or rows would lead most browsers to dump some inexplicable
extra space somewhere, usually at the end of the last cell on the first
row. It's most noticeable if the affected cell is centred - it fails to
align with others in the same column.

So:
<TABLE>
<FORM>
<TR><TD>

Add closing tags to taste.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-18-2007
In article <4718424d$(E-Mail Removed)>,
Steve Swift <(E-Mail Removed)> wrote:

> > change
> > <td>[history | <form>payment</form>]</td>
> > to
> > <td>[history | <form style="display:inline">payment</form>]</td>

>
> I've lost the beginning of this thread, so don't know the original question.
>
> Whenever I'm using a <FORM> inside a <TABLE> I always place the <FORM>
> inside the <TABLE> tag but *outside* any <TD></TD> or <TR></TR> constructs.
> I discovered (by trial and error) that placing the <FORM> inside one of
> your cells or rows would lead most browsers to dump some inexplicable
> extra space somewhere, usually at the end of the last cell on the first
> row. It's most noticeable if the affected cell is centred - it fails to
> align with others in the same column.
>
> So:
> <TABLE>
> <FORM>
> <TR><TD>
>
> Add closing tags to taste.


It is like making a casserole really, anything goes eh?

--
dorayme
 
Reply With Quote
 
Ben C
Guest
Posts: n/a
 
      10-18-2007
On 2007-10-18, Steve Swift <(E-Mail Removed)> wrote:
>> change
>> <td>[history | <form>payment</form>]</td>
>> to
>> <td>[history | <form style="display:inline">payment</form>]</td>

>
> I've lost the beginning of this thread, so don't know the original question.
>
> Whenever I'm using a <FORM> inside a <TABLE> I always place the <FORM>
> inside the <TABLE> tag but *outside* any <TD></TD> or <TR></TR> constructs.


Please don't do that! It's invalid HTML. The browser has to guess what
you meant, somehow patch up the document tree, decide which controls are
to go in which forms, and if the result looks and works the way you
want, it's only because of a lot of luck.

It could all change tomorrow or be completely different in a browser you
haven't tested on.

You're not alone, I see a lot of web pages where people have done this
(and similar but worse things). Don't propagate the bad advice.

> I discovered (by trial and error)


Not always the best way to discover things.

> that placing the <FORM> inside one of
> your cells or rows would lead most browsers to dump some inexplicable
> extra space somewhere, usually at the end of the last cell on the first
> row.


It's not inexplicabe, it's just a bottom margin in the quirks mode
stylesheet put there probably for compatibility with older browsers.

Get rid of it with form { margin-bottom: 0 } as explained in an earlier
post.

See also http://www.cs.tut.fi/~jkorpela/forms/tables.html
 
Reply With Quote
 
walosaw@yahoo.com.au
Guest
Posts: n/a
 
      10-18-2007
On Oct 17, 11:09 pm, (E-Mail Removed) wrote:
> Hello all,
>
> I have the following simple html how can I display the second table
> content like the first one. As i have add the <form>payment</form>
> tag. Any method to remove the spacing.
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | payment]</td>
> </tr>
> </table>
>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>[history | <form>payment</form>]</td>
> </tr>
> </table>
>
> Thx,
>
> Wing


This is a quck fix though it would be better to have all your style
sheet code in a seperate css file
change
<td>[history | <form>payment</form>]</td>
to
<td>[history | <form style="display:inline">payment</form>]</td>

Cheers

 
Reply With Quote
 
Steve Swift
Guest
Posts: n/a
 
      10-19-2007
> It is like making a casserole really, anything goes eh?

Precisely! And if, on occasions, you make a mistake (as my mother
frequently did), and the result is tastier, that becomes your new
recipe! http://www.swiftys.org.uk/wiz?106
Perhaps next time I'll say "Add a soupçon of closing tags"

Remember, the only "standard" that I'm designing to (in my commercial
activity, at least) is "Must work in IE6 and the current Firefox", so
pragmatic design outweighs hypothetical stuff. So the <FORM> tag goes
(a) where it works, and (b) where it causes none of my target audience
to get weird effects, then I move on to something else.

As far as Microsoft and the Firefox developers are concerned, I should
imagine one of their highest priorities is "Mustn't screw up legacy
pages with new releases otherwise the customers will switch to the
competition" so I'm happy they're looking after me.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Any way to control spacing between controls in web form? KatB ASP .Net 4 10-10-2004 09:00 PM
can't remove horizontal spacing Stijn Goris HTML 1 09-16-2004 10:17 AM
Table spacing - how can I remove the "carriage return"? michaaal HTML 21 08-06-2004 12:01 AM
How to remove additional spacing? Ding Lei XML 2 06-08-2004 02:49 AM



Advertisments