为什么我的桌子冻结了

时间:2015-01-08 14:11:25

标签: html css

抱歉,这是我的jsfiddle.net链接>> http://jsfiddle.net/2vw1035n/

为什么我的色谱柱会在右侧冷冻?

这是我的表



    #table {
      margin-left: 260px;
      border: none;
      font-size: 14pt;
      font-weight: bold;
      font-family: 'bookman old style';
    }

<form>
<div class="regisContent">
	<table id='regisTable'>
		<tr>
			<td>
				<label for="fname">Name</label>
			</td>
			<td>:</td>
			<td>
				<input type="text" name="fname" id="fname"  placeholder="Input your name here.." id='textConf'/>
		    </td>
		</tr>
					
		<tr>
			<td>
				<label for="passw">Password</label>
			</td>
			<td>:</td>
			<td>
				<input type="password" name="passw" id="passw" placeholder="Input your password here.." id='textConf'/>
			</td>
		</tr>
					
		<tr>
			<td>
				<label for="cnpass">Confirm Password</label>
			</td>
		    <td>:</td>
			<td>
			    <input type="password" name="cnpass" id="cnpass" placeholder="Please input your password again.." id='textConf'/>
			</td>
		</tr>
					
		<tr>
			<td>
				 <label for="email">Email</label>
			</td>
			<td>:</td>
		     <td>
				<input type="text" name="email" id="email" placeholder="Input your email here.." id='textConf'/>
			</td>
		</tr>
					
		<tr>
			<td>
			    <label for="phone">Phone</label>
			</td>
		    <td>:</td>
			<td>
				<input type="phone" name="phone" id="phone" placeholder="Input your telephone number here.." id='textConf'/>
			</td>
		</tr>
					
		<tr>
			<td>
					<label for="gender">Gender</label>
			</td>
			<td>:</td>
			<td>
				    <input type="radio" name="gender" id="male" value="male"> Male
				    <input type="radio" name="gender" id="female" value="female"> Female
			</td>
		</tr>
					
		<tr>
			<td>
					<label for="address">Address :</label><br/>
					<textarea rows="7" cols="57" name="address" id="address" placeholder="Input your address here.."></textarea>
			</td>
		</tr>
					
		<tr>
			<td>
					<fieldset id =box>
					<legend>Terms & Conditions:</legend>
					<pre id=terms>							
Welcome to our website. If you continue to browse and use this website, 
you are agreeing to comply with and be bound by the our terms 
and conditions of use, which together with our privacy policy govern Baggy 
Bag Shop relationship with you in relation to this website. 
					</pre>	
					</fieldset>
			</td>
		</tr>
					
		<tr>
			<td>
					<input type="checkbox" name="agreement" id="ck" value="agreement"> 
					<label for="ck" class='textConf'>I agree with the terms and conditions stated above</label>
			</td>
		</tr>
					
		<tr>
			<td>
					<input type="submit" value="Submit"onclick="validate()"/>
					<input type="reset" value="Cancel"/>
					<!--<input type="button" value="Poke" onmouseover="this.style.background='white'" onmouseout="this.style.background='gray'" />-->
			</td>
		</tr>
	</table>
	</div>
</form>
&#13;
&#13;
&#13;

我不能在这里发布任何图片,因为我没有声誉..

1 个答案:

答案 0 :(得分:0)

我稍微调整了你的表格格式,然后用标签将最大宽度应用到td上。这里演示:http://jsfiddle.net/2vw1035n/2/

 <tr>
     <td>
        <label for="fname">Name</label>:
     </td>
     <td>
         <input type="text" name="fname" id="fname"  placeholder="Input your name here.." id='textConf'/>
     </td>
 </tr>

的CSS:

tr>td:nth-child(1) {
    max-width:100px;
}

希望这会有所帮助