Page 1 of 1

table help [solved]

Posted: Wed Dec 21, 2005 11:43 pm
by method_man
hey im making a register page and i need a little help with the table.

first question: why does the right column in the middle row appear off the table?
second question: how can i make the submit button align in the center?

Code: Select all

<table border="1" width="100%" height="100%">
<tr>
  <td width="100%" height="10%"> <p align="center">Street Lyfe Registration</p> </td>
</tr>
<tr>
  <td width="50%" height="80%"> Contents </td>
  <td width="50%" height="80%"> Contents </td>
</tr>
  <td width="100%" height="10%"><input type="submit" value="Submit" name="Submit"></p>
</table>
heres the link: http://www.twarowski.xmgfree.com/street ... gister.htm

thanks,

matt

Posted: Wed Dec 21, 2005 11:50 pm
by method_man
i have figured out how to put the submit centered but i still need my other question answered please

Posted: Wed Dec 21, 2005 11:53 pm
by redmonkey
Unoless I'm missing the obvious, you only appear to have defined two table rows? you then appear to have a table cell which appears to be A) have no closing tag and B) wandering around on it's own (i.e. not within a table row).

You also need to look at the 'colspan' attribute.

Posted: Thu Dec 22, 2005 12:07 am
by method_man
yea ive fixed that

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title> Street Lyfe Registration </title>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="Matt Twarowski">
<META NAME="Keywords" CONTENT="Street, Lyfe, Gangs, Game">
<META NAME="Description" CONTENT="An Online Game">
</head>
<body>

<table border="1" width="100%" height="100%">
<tr>
  <td align="center" width="100%" height="10%"> Street Lyfe Registration </td>
</tr>
<tr>
  <td align="center" width="50%" height="80%"> Contents </td>
  <td align="center" width="50%" height="80%"> Contents </td>
</tr>
<tr>
  <td align="center" width="100%" height="10%"><input type="submit" value="Submit" name="Submit">
  </td>
</tr>
</table>

</body>
</html>
ive tried using colspan but i cant seem to get it just right, something always ends up going in another place then i want it