jack5100nv Posted March 8, 2010 Share Posted March 8, 2010 Ok, I have the following code. I want the form fields with the Submit button nicely tucked in the table row with bgcolor. However, whgen I view it in Firefox or IE8, I get extra space under the form fields (see screenshot). How can I remove that extra space. I tried Including the form in div tags and stuff but no luck. <html> <body> <br><br> <table align="center" cellpadding="0" cellspacing="0" width="780" valign="top"> <tr> <td bgcolor='#cccccc' align='right'> <form method='post' action='test.php'> <input type='text' size='15' name='searchtext'> <select name='cat'> <option value='1'>Test1</option> <option value='2'>Test2</option> <option value='3'>Test3</option> </select> <input type='submit' value=Submit> </form> </td> </tr> </table> </body> </html> [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/194537-extra-line-break-how-can-i-remove-it/ Share on other sites More sharing options...
ferdi Posted March 8, 2010 Share Posted March 8, 2010 Try putting the form outside the table, it sometimes works for me. But it really should matter though. <html> <body> <br><br> <form method='post' action='test.php'> <table align="center" cellpadding="0" cellspacing="0" width="780" valign="top"> <tr> <td bgcolor='#cccccc' align='right'> <input type='text' size='15' name='searchtext'> <select name='cat'> <option value='1'>Test1</option> <option value='2'>Test2</option> <option value='3'>Test3</option> </select> <input type='submit' value=Submit> </td> </tr> </table> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/194537-extra-line-break-how-can-i-remove-it/#findComment-1023194 Share on other sites More sharing options...
patriklko Posted March 25, 2010 Share Posted March 25, 2010 you can remove the extra space by setting bottom margin to 0px; and another option is to put the whole <table> tag in <div> tag and then set the style for <div> accordingly... Link to comment https://forums.phpfreaks.com/topic/194537-extra-line-break-how-can-i-remove-it/#findComment-1031513 Share on other sites More sharing options...
Porl123 Posted April 14, 2010 Share Posted April 14, 2010 Adding style="display:inline;" to the form tag should remove that. Link to comment https://forums.phpfreaks.com/topic/194537-extra-line-break-how-can-i-remove-it/#findComment-1041530 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.