2013-05-04 198 views
1

我正在为我的个人使用制作一个网站。我需要一些助手来设置如何在不使用表格的情况下在标签旁边设置文本框。他们在自己的分工标签在不使用表格的情况下在textbos旁边设置标签HTML CSS

<div id="outter"> 

     <div class="1"> 
     Fill out and submit the form below and we will contact you a.s.a.p. 
     </div> 

     <div class="2"> 
     <label> Name: </label> 
     </div> 
      <div class="2"> 
     <input name="name" type="text" class="3" > 
     </div> 
</div> 

试图让这个:

[input box 1] label 1 
[input box 2] label 2 

这里是链接更好的细节

http://homework.genesee.edu/~dmead1/forms/table.html

回答

0

方案非常简单你的问题

HTML

<fieldset class="login">  
<legend>Fill out and submit the form below and we will contact you a.s.a.p. </legend> 

<div><label for="name">Name</label> <input type="text" id="name" name="name"></div> 

</fieldset> 

CSS

fieldset div { 
    margin:0.3em 0; 
    clear:both; 
} 

检查Fiddle

相关问题