【问题标题】:Setting the label next to a textbos without using tables HTML\CSS在不使用表格 HTML\CSS 的情况下设置文本框旁边的标签
【发布时间】:2013-05-04 07:10:16
【问题描述】:

我正在做一个供我个人使用的网站。我需要一些助手来了解如何在不使用表格的情况下在标签旁边设置文本框。他们在自己的部门标签中

<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

【问题讨论】:

    标签: forms html text textbox label


    【解决方案1】:

    您的问题的非常简单的解决方案

    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

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 1970-01-01
      • 2015-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-18
      • 2013-02-18
      相关资源
      最近更新 更多