Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-23-2010, 01:53 AM   PM User | #1
roher4
New Coder

 
Join Date: Jul 2010
Location: Canada
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
roher4 is an unknown quantity at this point
Question How do I make a line break in a table?

How can I do it? I've been trying but keep failing.
roher4 is offline   Reply With Quote
Old 11-23-2010, 02:01 AM   PM User | #2
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
You mean <br />?
teedoff is offline   Reply With Quote
Old 11-23-2010, 03:15 AM   PM User | #3
roher4
New Coder

 
Join Date: Jul 2010
Location: Canada
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
roher4 is an unknown quantity at this point
Quote:
Originally Posted by teedoff View Post
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.
roher4 is offline   Reply With Quote
Old 11-23-2010, 03:28 AM   PM User | #4
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
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.

Last edited by teedoff; 11-23-2010 at 03:41 AM..
teedoff is offline   Reply With Quote
Old 11-23-2010, 03:44 AM   PM User | #5
roher4
New Coder

 
Join Date: Jul 2010
Location: Canada
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
roher4 is an unknown quantity at this point
Code:
<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.
roher4 is offline   Reply With Quote
Old 11-23-2010, 05:30 AM   PM User | #6
santhoshj400
Banned

 
Join Date: Jul 2010
Posts: 66
Thanks: 0
Thanked 1 Time in 1 Post
santhoshj400 is an unknown quantity at this point
Hi,
You can do it by inserting a td with non breakable space i.e &nbsp;
and then provide clospan to other table occordingly
santhoshj400 is offline   Reply With Quote
Old 11-23-2010, 01:36 PM   PM User | #7
roher4
New Coder

 
Join Date: Jul 2010
Location: Canada
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
roher4 is an unknown quantity at this point
Quote:
Originally Posted by santhoshj400 View Post
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?
roher4 is offline   Reply With Quote
Old 11-23-2010, 02:06 PM   PM User | #8
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
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?
teedoff is offline   Reply With Quote
Old 11-23-2010, 10:21 PM   PM User | #9
roher4
New Coder

 
Join Date: Jul 2010
Location: Canada
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
roher4 is an unknown quantity at this point
Quote:
Originally Posted by teedoff View Post
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?

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

Code:
<table align="right" width="460" border="0" cellpadding="3" cellspacing="3">
roher4 is offline   Reply With Quote
Reply

Bookmarks

Tags
break, line., table

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:58 AM.


Advertisement
Log in to turn off these ads.