Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-05-2003, 10:53 AM   #1
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
Html: Extra Spaces on Top

Any ideas why the form shows extra spaces on top?

<?php include 'header.php' ?>
<form method="POST"action="<?php echo 'index.php'?>">
<table border="1" cellpadding="2" cellspacing="1" width="600" align="top">

<td align="left" valign="top"><font size="0" face="arial, helvetica, sans-serif"><b>Full Name:</b></font> </td><td align="left" valign="top"><input type="text" name="FulName" size=25 maxlength=50></td><BR>
<tr><td align="left" valign="top"><font size="0" face="arial, helvetica, sans-serif"><b>Business:</b></font></td><td align="left" valign="top"><input type="text" name="Business" size=25 maxlength=50></td></tr><BR>

<tr><td align="left" valign="top"><font size="0" face="arial, helvetica, sans-serif"><b>Day Time Phone Number: </b></font></td><td align="left" valign="top"><input type="text" name="DayTimePhoneNumber" size=25 maxlength=50></td></tr><BR>

<tr><td align="left" valign="top"><font size="0" face="arial, helvetica, sans-serif"><b>E-mail:</b></font></td><td align="left" valign="top"><input type="text" name="email" size=25 maxlength=50></td></tr><BR><BR>

<tr><td align="left" valign="top"> <font size="0" face="arial, helvetica, sans-serif"><b> Preferred Condition:</b></font></td> <td align="left" valign="top">

<select name= "Preferred Condition" size=1>
<option value="1">New
<option value="2"> Used

<tr> <td align="left" valign="top"> <font size="0" face="arial, helvetica, sans-serif"><b>Date:</b></font></td>
<td><select name="month" size=1>
<option value="01">January
<option value="02">February
<option value="03">March
<option value="04">April
<option value="05">May
<option value="06">June
<option value="07">July
<option value="08">August
<option value="09">September
<option value="10">October
<option value="11">November
<option value="12">December
</select> <input type="text" name="Day" size=3 maxlength=2>
<select name="Year" size=1>
<option value="2003">2003
<option value="2004">2004

<tr><td align="left" valign="top"><font size="-1" face="arial, helvetica, sans-serif"><b>Just words</b></font>

<td align="left" valign="top"><input type="radio" name="account" value="Yes"> Yes &nbsp <input type="radio" name="account" value="No"> No</td></tr>

Last edited by mikeshn; 07-05-2003 at 10:55 AM.
Old 07-05-2003, 04:40 PM   #2
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
I wish i could just point the error out, but i was just overwhelmed by the amount of errors and omitions you have in your code. So instead of trying to read through it, i instead took the liberty to rewrite that basics of your code in more standard html (following mostly xhtml rules).

	<style type="text/css">
		body {
			font-family:  Arial, Helvetica, Sans-serif;
	<form method="post">
		<table border="1" cellpadding="2" cellspacing="1" width="600" valign="top">
				<td>Full name: </td>
				<td><input type="text" size="25" maxlength="50"/></td>
				<td>Business: </td>
				<td><input type="text" size="25" maxlength="50"/></td>
				<td>Day Time Phone Number: </td>
				<td><input type="text" size="25" maxlength="50"/></td>
				<td>E-mail: </td>
				<td><input type="text" size="25" maxlength="50"/></td>
				<td>Preferred Condition: </td>
				<td>Date: </td>
					<input type="text"size=3 maxlength=2/>
				<td><b>Just words: </td>
				<td><input type="radio"/>Yes<input type="radio"/>No</td>
Things you should look at:
-CSS (cascading style sheets). Move most of your styling code seperate from main html structure code so you can stop using the depricated "font" tag (which will eliminate the need to keep repeating the same thing...). In my rewrite i put one rule at the top of the code in the head (<style type="text/css">...styling rules...</style>. Styling rules are your best friend!
-Don't forget to put all the required html tags, ie <html><head><title></title><body></body></html>

My point is not to bring you down, but with code like this it's really hard to figure out what's actually wrong. So look more into html and css.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML: How do I insert empty spaces? Cyberian Programming 3 02-10-2005 10:06 AM
spaces between tables (HTML) 95se Programming 7 10-28-2004 12:12 PM
Remove white spaces in HTML files using shell : Possible???????? cpanelskindepot Programming 2 08-06-2004 12:14 AM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 06:06 AM
HTML+spaces+Windows Ctawp Programming 1 08-20-2003 02:57 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration