Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 它在一个字段中可能有2个字段,在左上方设置一个&;右下角第二个。。?_Html_Css - Fatal编程技术网

Html 它在一个字段中可能有2个字段,在左上方设置一个&;右下角第二个。。?

Html 它在一个字段中可能有2个字段,在左上方设置一个&;右下角第二个。。?,html,css,Html,Css,这是我的html代码,我希望左上角有一个图例,右下角也有一个图例。因此,请提供一些细节,我如何才能做到这一点或任何其他建议看起来像 HTML <fieldset class="first_formclass2"> <legend class="legend_class2">Company Details</legend> <legend class="legend_class3">Company Details</leg

这是我的html代码,我希望左上角有一个图例,右下角也有一个图例。因此,请提供一些细节,我如何才能做到这一点或任何其他建议看起来像

HTML

   <fieldset class="first_formclass2">
    <legend class="legend_class2">Company Details</legend>
    <legend class="legend_class3">Company Details</legend>
    <label for="address" class="label_classregistration1">Name:</label>
    <input class="for_namingpadding" type="text" name="name" placeholder="First-name"/>
    <input type="text" name="name" id="name" placeholder="Last-name" />


     <label for="address" class="label_classregistration1">Username:</label>
     <input class="how_how" type="text" name="name" placeholder="John1234" /


    </fieldset>

如果我理解正确,这是我的版本

 <fieldset class="first_formclass2">
    <legend class="legend_class2">Company Details</legend>
   <form>
      <legend class="legend_class3">Company Details</legend>
   <label for="address" class="label_classregistration1">Name:</label>
    <input class="for_namingpadding" type="text" name="name" placeholder="First-name"/>
    <input type="text" name="name" id="name" placeholder="Last-name" />


     <label for="address" class="label_classregistration1">Username:</label>
     <input class="how_how" type="text" name="name" placeholder="John1234" /
            </form>

    </fieldset>


.first_formclass2 {
  height: 200px;
  position: relative;
} 
.legend_class1
      {
     padding: 15px 10px;
      border:1px solid #686868;
      color:#000;
      font-size:1.5em;
     text-align:left;
         }

     .legend_class2 {
       padding: 15px 10px;
     border:1px solid #686868;
       color:#000;
      font-size:1.5em;
        text-align:left;
      }
form {
    position: absolute;
  bottom:10px;
  right:10px;
  display:inline-block;
}

公司详情
公司详情
姓名:
用户名:

您需要使用CSS
position
属性。你必须修改你的CSS和HTML多一点

HTML:


表单
应该在
字段集
之外,这是HTML 5()不允许的,可能还有其他版本
 <fieldset class="first_formclass2">
    <legend class="legend_class2">Company Details</legend>
   <form>
      <legend class="legend_class3">Company Details</legend>
   <label for="address" class="label_classregistration1">Name:</label>
    <input class="for_namingpadding" type="text" name="name" placeholder="First-name"/>
    <input type="text" name="name" id="name" placeholder="Last-name" />


     <label for="address" class="label_classregistration1">Username:</label>
     <input class="how_how" type="text" name="name" placeholder="John1234" /
            </form>

    </fieldset>


.first_formclass2 {
  height: 200px;
  position: relative;
} 
.legend_class1
      {
     padding: 15px 10px;
      border:1px solid #686868;
      color:#000;
      font-size:1.5em;
     text-align:left;
         }

     .legend_class2 {
       padding: 15px 10px;
     border:1px solid #686868;
       color:#000;
      font-size:1.5em;
        text-align:left;
      }
form {
    position: absolute;
  bottom:10px;
  right:10px;
  display:inline-block;
}
 <fieldset class="first_formclass2">
<legend class="legend_class2">Company Details</legend>
<legend class="legend_class3">Company Details</legend>
<div style="padding-bottom:40px;>
<label for="address" class="label_classregistration1">Name:</label>
<input class="for_namingpadding" type="text" name="name" placeholder="First-name"/>
<input type="text" name="name" id="name" placeholder="Last-name" />


 <label for="address" class="label_classregistration1">Username:</label>
 <input class="how_how" type="text" name="name" placeholder="John1234" /
</div>

</fieldset>
 .legend_class2
 {
 padding: 15px 10px;
 border:1px solid #686868;
 color:#000;
 font-size:1.5em;
 text-align:left;
 }

.legend_class3 {
padding: 15px 10px;
border:1px solid #686868;
color:#000;
font-size:1.5em;
text-align:left;
position:absolute;
bottom:-20px;
right:0;
margin-right:20px;
background-color:#fff;
z-index:2;
}
.first_formclass2{position:relative}