PDA

View Full Version : How do I make a line break in a table?



roher4
Nov 23rd, 2010, 02:53 AM
How can I do it? I've been trying but keep failing.

teedoff
Nov 23rd, 2010, 03:01 AM
You mean <br />?

roher4
Nov 23rd, 2010, 04:15 AM
You mean <br />?

I know what a line break is usually, it's just in a table...(with some form elements) it didn't break... i tried using a spacer, but that didnt work either.

teedoff
Nov 23rd, 2010, 04:28 AM
Well it works in my tables, so I dont know what to tell you.

Maybe if you post your code and say where you're trying to insert a line break, we can help.

roher4
Nov 23rd, 2010, 04:44 AM
<p> </p>
<form id="registerForm" name="registerForm" method="post" action="register-exec.php">
<div>
<br />
<br/>
<h3 "style="position: absolute; top:80px; left:745px; width:200px; height:25px""><br>Sign up below:</h3>

<br />

<table align="right" width="460" border="0" cellpadding="3" cellspacing="3">
<tr>
<th> </th>
<td> </td>
<tr>
<th>Full Name</th>
<td><input name="fname" type="text" class="textfield" id="fname"></td>
</tr>
<tr>
<th>Date of Birth</th>
<td><select>
<option value="1">Month</option>
<option value="2">Jan</option>
<option value="3">Feb</option>
<option value="4">Mar</option>
<option value="5">Apr</option>
<option value="6">May</option>
<option value="7">Jun</option>
<option value="8">Jul</option>
<option value="9">Aug</option>
<option value="10">Sep</option>
<option value="11">Oct</option>
<option value="12">Nov</option>
<option value="13">Dec</option>
</select> <select name="birthday_day" id="birthday_day" onchange="">
<option value="-1">Day:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select> <select name="birthday_year" id="birthday_year" onchange="return run_with(this, [&quot;editor&quot;], function() {editor_date_month_change(&quot;birthday_month&quot;,&quot;birthday_day&quot;,this);});">
<option value="-1">Year:</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
<option value="2004">2004</option>
<option value="2003">2003</option>
<option value="2002">2002</option>
<option value="2001">2001</option>
<option value="2000">2000</option>
<option value="1999">1999</option>
<option value="1998">1998</option>
<option value="1997">1997</option>
<option value="1996">1996</option>
<option value="1995">1995</option>
<option value="1994">1994</option>
<option value="1993">1993</option>
<option value="1992">1992</option>
<option value="1991">1991</option>
<option value="1990">1990</option>
<option value="1989">1989</option>
<option value="1988">1988</option>
<option value="1987">1987</option>
<option value="1986">1986</option>
<option value="1985">1985</option>
<option value="1984">1984</option>
<option value="1983">1983</option>
<option value="1982">1982</option>
<option value="1981">1981</option>
<option value="1980">1980</option>
<option value="1979">1979</option>
<option value="1978">1978</option>
<option value="1977">1977</option>
<option value="1976">1976</option>
<option value="1975">1975</option>
<option value="1974">1974</option>
<option value="1973">1973</option>
<option value="1972">1972</option>
</select></td>
</tr>
<tr>
<th class="label"><strong>Email</strong></th>
<td><input name="fname" type="text" class="textfield" id="fname"></td>
</tr>
<tr>
<th>Gender</th>
<td><input type="radio" name="sex" value="male"> Male <input type="radio" name="sex" value="female"> Female</td>
</tr>
<tr>
<th>Password</th>
<td><input name="password" type="password" class="textfield" id="password"></td>
</tr>
<tr>
<th>Confirm Password</th>
<td><input name="cpassword" type="password" class="textfield" id="cpassword"></td>
</tr>
<tr>
<th>School</th>
<td><select name="select">
<option>Select Food:</option>
<option>Pizza</option>
<option>Fries</option>
<option>Smoothie</option>
</select></td>
<th> </th>
<td></td>
</tr>
<tr>
<th>I agree to the <a href="terms.html" style="color:"white"; link-color:"white;">Terms of Service</a>.</th>
<td>
<div class="c4"><input type="checkbox" name="option1" value="TOS"></div>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<th rowspan="2"><input type="submit" name="Submit" value="Submit" align="middle"></th>
</tr>
<tr>
<td></td>
</tr>
</table>
</div>
<div>


I used a HTML Validator and it messed some of my tags up but heres the code.

santhoshj400
Nov 23rd, 2010, 06:30 AM
Hi,
You can do it by inserting a td with non breakable space i.e &nbsp;
and then provide clospan to other table occordingly

roher4
Nov 23rd, 2010, 02:36 PM
Hi,
You can do it by inserting a td with non breakable space i.e &nbsp;
and then provide clospan to other table occordingly


Can you provide me with an example? I get what you mean by the td and the nonbreaking space but not by the clospan?

teedoff
Nov 23rd, 2010, 03:06 PM
I'm still confused. You didnt say where and how you wanted to use a line break in your table.

And a good html validator wouldn't mess your code up. Bad code that needs to be fixed might make what you thought looked good look not so good. Did you use w3schools validator (http://validator.w3.org)?

roher4
Nov 23rd, 2010, 11:21 PM
I'm still confused. You didnt say where and how you wanted to use a line break in your table.

And a good html validator wouldn't mess your code up. Bad code that needs to be fixed might make what you thought looked good look not so good. Did you use w3schools validator (http://validator.w3.org)?


I wanted the line break before the registration form occurs. Im pretty sure Iused w3s...


<table align="right" width="460" border="0" cellpadding="3" cellspacing="3">