HTML form with side by side input fields

后端 未结 6 1727
离开以前
离开以前 2021-02-05 10:52

I have a html form that is basically vertical but i really have no idea how to make two text fields on the same line. For example the following form below i want the First and L

6条回答
  •  旧时难觅i
    2021-02-05 11:19

    Put style="float:left" on each of your divs:

    ...........

    Example:

    To put an element on new line, put this div below it:

     

    Of course, you can also create classes in the CSS file:

    .left{
      float:left;
    }
    
    .clear{
      clear:both;
    }
    

    And then your html should look like this:

    To put an element on new line, put this div below it:

     

    More Info:

    • CSS Float Clear Tutorial

提交回复
热议问题