Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI and Alignning text

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
US
I have written the following statements to align the text. However, it does not align. Please help. Thanks.

print &quot;<table bgcolor=ccffff><tr> \n&quot;;
print &quot;<font color=black size=2>\n&quot;;
print &quot;<tr><td align=\&quot;right\&quot;> Name:<input type=\&quot;text\&quot; name=\&quot;Name\&quot; value=\&quot;$name\&quot; size=32> </td> </tr> \n&quot;;
print &quot;<tr><td align=\&quot;right\&quot;> House-Apartment Address:<input type=\&quot;text\&quot; name=\&quot;Address\&quot; value=\&quot;$address\&quot; size=30></td></tr>\n&quot;;
print &quot;<tr><td align=\&quot;right\&quot;> City:<input type=\&quot;text\&quot; name=\&quot;City\&quot; value=\&quot;$city\&quot; size=20> </td> </tr>\n&quot;;
print &quot;<tr><td align=\&quot;right\&quot;> State:<input type=\&quot;text\&quot; name=\&quot;State\&quot; value=\&quot;$state\&quot; size=10> </td></tr>\n&quot;;
print &quot;<tr><td align=\&quot;right\&quot;> Zip-Code:<input type=\&quot;text\&quot; name=\&quot;Zip-Code\&quot; value=\&quot;$zipcode\&quot; size=10></td></tr></font></table>\n&quot;;
 
First, you can print all of that in one print statement and it will be a lot easier to read/troubleshoot.
Code:
print qq(    <table>
    <tr>
      <td>table cell</td>
    </tr>
  </table>);

Second, I immediately see one HTML error. You are opening a 'tr' tag in the first print and a second 'tr' tag in the third print statement. Try the printing trick above and check your html carefully.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top