|
-
Nov 12th, 2005, 06:48 PM
#1
Thread Starter
Addicted Member
HTML help[RESOLVED]
Hi everyone
I hope that this is a simple question... well.. this is my HTML code:
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi
<form><input type=hidden value='hello' height=0>
</form>
</td>
</tr>
</table>
</body>
</html>
Well, my problem is that the table comes up with an extra space, something like this:
+---+
|hi |
| * |
+---+
And I would like for my table to look like this:
+---+
|hi |
+---+
I suspect the <input type=hidden> to be causing this but I dont know how to get rid of this problem. Anyone have any idea of how to fix this?
Last edited by Osiris; Nov 12th, 2005 at 08:28 PM.
؊Ϯϊ
-
Nov 12th, 2005, 06:56 PM
#2
Re: HTML help
Since you have your formatting of code with a carriage return (line break) it adds the break to after your form resulting in an additional line.
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi
<form><input type=hidden value='hello' height=0></form>
</td>
</tr>
</table>
</body>
</html>
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 12th, 2005, 07:02 PM
#3
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by RobDog888
Since you have your formatting of code with a carriage return (line break) it adds the break to after your form resulting in an additional line.
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi
<form><input type=hidden value='hello' height=0></form>
</td>
</tr>
</table>
</body>
</html>
No, that's not it... as I understand HTML ignores any carriage return and only accepts the tag <br>...
edit:
Actually, the problem is the form itself, wheneven I remove the form the problem goes away...
Last edited by Osiris; Nov 12th, 2005 at 07:05 PM.
؊Ϯϊ
-
Nov 12th, 2005, 07:07 PM
#4
Re: HTML help
Oops I missed the "Hi" being in there. You have a line break after the "Hi" and then your form. Place that all on one line.
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi<form><input type=hidden value='hello' height=0></form></td>
</tr>
</table>
</body>
</html>
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 12th, 2005, 07:11 PM
#5
Re: HTML help
either place the table within the form or set the forms style to display:none
PHP Code:
<html>
<body>
<form >
<table border=1>
<tr>
<td>hi <input type=hidden value='hello' height=0 ></td>
</tr>
</table>
</form>
</body>
</html>
-
Nov 12th, 2005, 07:13 PM
#6
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by RobDog888
Oops I missed the "Hi" being in there. You have a line break after the "Hi" and then your form. Place that all on one line.
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi<form><input type=hidden value='hello' height=0></form></td>
</tr>
</table>
</body>
</html>
I have already tried that...
the space is still there when the HTML code is only this:
HTML Code:
<html>
<body>
<table border=1>
<tr>
<td>hi<form></form></td>
</tr>
</table>
</body>
</html>
[/QUOTE]
and when I remove the <form> tags it becomes ok...
-
Nov 12th, 2005, 07:14 PM
#7
Re: HTML help
Ok then, is your cell wide enough or the form could be causing a word wrap effect.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 12th, 2005, 07:23 PM
#8
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by DeadEyes
either place the table within the form or set the forms style to display:none
PHP Code:
<html>
<body>
<form >
<table border=1>
<tr>
<td>hi <input type=hidden value='hello' height=0 ></td>
</tr>
</table>
</form>
</body>
</html>
Well, I wouldn't be able to do this because originally I will have this code generated by PHP and create many tables
PHP Code:
<html>
<body>
<table name='main_table'>
<tr>
<td>
<form >
<table border=1>
<tr>
<td>hi <input type=hidden value='hello' height=0 ></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>hi 2<input type=hidden value='hello2'>
</td>
</tr>
</table>
</body>
</html>
how would you set the form's style display to none?
<form display=none>?
I would like to try this second option...
-
Nov 12th, 2005, 07:24 PM
#9
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by RobDog888
Ok then, is your cell wide enough or the form could be causing a word wrap effect.
Yeah, perhaps, I will try extending the cell... or try the forms display style to none... if i am able to try it.
-
Nov 12th, 2005, 07:44 PM
#10
Re: HTML help
 Originally Posted by Osiris
how would you set the form's style display to none?
<form display=none>?
I would like to try this second option... 
HTML Code:
<form style="display:none">
but thats workaround not a proper solution. You might want to reconsider how the code is being generated fixing it may be a pain but it might work out better in the long run.
-
Nov 12th, 2005, 08:01 PM
#11
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by DeadEyes
HTML Code:
<form style="display:none">
Setting the display to none works great!
Thanks everyone for your help. 
but thats workaround not a proper solution. You might want to reconsider how the code is being generated fixing it may be a pain but it might work out better in the long run.
I think I have to use this...
I am generating a tables withing a main table and each table generated is wrapped by a form that will be submitted, and these forms are giving me extra spaces... i wouldn't know how else i would go about generating the code so it is formatted withing a table.
-
Nov 12th, 2005, 08:05 PM
#12
Thread Starter
Addicted Member
Re: HTML help
Heh, I didn't realize that the style="display:none" made everything in the form disappear until i applied it to my actual code... =|
i guess you are right, that would not be a good idea to fix my problem...
-
Nov 12th, 2005, 08:23 PM
#13
Re: HTML help
What you see is a form margin. A simple peice of CSS will sort that. Also, don't use the border=1 attribute, it is deprecated 
HTML Code:
<html>
<style type="text/css">
table td form {
margin-top: 0px;
}
table td {
border-style: outset;
border-color: white;
border-width: 5px;
padding-right: 5px;
}
</style>
<body>
<table>
<tr>
<td>hi <form><input type=hidden value='hello' height=0> </form> </td>
</tr>
<tr>
<td>hi <form><input type=hidden value='hello' height=0> </form> </td>
</tr>
</table>
</body>
</html>
Sorry, the forums screws up the spacing in the HTML - but hopefully you get the idea.
-
Nov 12th, 2005, 08:24 PM
#14
Thread Starter
Addicted Member
Re: HTML help
Ok, I did manage to work around the problem using the style="display:none"...
Just in case in the future someone has the same problem I will post what I did... but I don't think will apply to all cases because we wouldn't want the form to be invisible.
my solution:
Code:
<table name='main_table'>
<tr>
<td>
<table>
<tr>
<td>
information
</td>
<td>
<form name='frm0' style='display:none'>
<input type=hidden name='field0' value='x'>
</form>
<input type=button value='View' onclick="document.frm0.submit();">
</td>
</tr>
</table>
</td>
</tr>
</table>
-
Nov 12th, 2005, 08:25 PM
#15
Re: HTML help
Look at my previous post
-
Nov 12th, 2005, 08:31 PM
#16
Thread Starter
Addicted Member
Re: HTML help
 Originally Posted by visualAd
Look at my previous post 
Thanks visualAd
And thanks everyone that helped...
-------
if we shouldn't use border=1... what should we use? the 'style' attribute?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|