<table width="100%" border="1"> <form action="event.php" method="post" name="event" id="event"> <tr> <td width="%20">Crime</td> <td width="%20">Money</td> <td width="%20">Chance</td> <td width="%20">Burglar men</td> <td width="%20"><input type="submit" value="submit"></td> </tr> </form> </table>
Help With Table Percent
#1
Posted 21 November 2012 - 04:49 AM
#2
Posted 21 November 2012 - 12:40 PM
<form action="event.php" method="post" name="event" id="event"> <table width="100%" border="1"> <tr> <td width="%20">Crime</td> <td width="%20">Money</td> <td width="%20">Chance</td> <td width="%20">Burglar men</td> <td width="%20"><input type="submit" value="submit" /></td> </tr> </table> </form>
Your form tag should be outside of your table AND you should have a closing "/" on your input. See if that takes care of your layout issue. And while it isn't a validation issue, you should choose to put the "%" consistently before or after the number to make it easier to view for others - after the number is most widely accepted, but either way, try not to go back and forth like in this example (i.e. 100% and %20).
Edited by rjmcintyre7, 21 November 2012 - 12:42 PM.
#3
Posted 24 November 2012 - 03:47 PM
Was never aware '%20' was allowed.
Regards,
AoTB.
Edited by AoTBuNgLe, 24 November 2012 - 03:48 PM.
V.V and O.V <3
http://www.labtec.0f...oved/?page=home
http://www.tpuc.org/
http://www.getoutofdebtfree.org/
#4
Posted 24 November 2012 - 03:55 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#5
Posted 25 November 2012 - 01:24 AM
<form action="event.php" method="post" name="event" id="event">
<tr>
<td width="20%">Crime</td>
<td width="20%">Money</td>
<td width="20%">Chance</td>
<td width="20%">Burglar men</td>
<td width="20%"><input type="submit" value="submit"></td>
</tr>
</form>
</table>
#6
Posted 25 November 2012 - 01:28 AM
<table width="96%" border="1">
<form action="event.php" method="post" name="event" id="event">
<tr>
<td width="20%">Crime</td>
<td width="20%">Money</td>
<td width="20%">Chance</td>
<td width="31%">Burglar men</td>
<td width="9%"><input type="submit" value="submit"></td>
</tr>
</form>
</table>
#7
Posted 25 November 2012 - 12:11 PM
#8
Posted 25 November 2012 - 08:24 PM
Say the table at 96% was 1000px wide. If you set a TD to 20%, it will be 20% of that 96% or 1000px which is a TD with a width of 200px.You are setting your table width to 96% yet it adds up to 100%
#9
Posted 26 November 2012 - 04:47 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












