0
 <fieldset>
        <h2 class="fs-title">Personal Details</h2>
        <h3 class="fs-subtitle">Please Enter your personal details</h3>
        <input id="finame" type="text" name="fname" placeholder="Firstname" />
        <input type="text" name="lname" placeholder="Lastname" />
        <div class="mof">
        <input type="radio" name="mof" value="Male" align="left">Male</input>
        <input type="radio" name="mof" value="Male" align="left">Male</input>
        </div>
        <input type="password" name="pass" placeholder="Password" />
        <input type="password" name="cpass" placeholder="Confirm Password" />
        <input type="button" name="next" class="next action-button" value="Next" />
    </fieldset>

This is the output I am getting

https://i.stack.imgur.com/pPr7o.jpg

I would like to have the firstname and lastname next each other and also the radio buttons in series.

I would also like to add a '+' symbol which will add additional text fields dynamically to the form and make it scrollable.

user229044
  • 232,980
  • 40
  • 330
  • 338
user3205736
  • 33
  • 1
  • 2
  • 4

3 Answers3

4

You can use a CSS span class for that. Here is a tutorial.

http://html.net/tutorials/css/lesson8.php

Hope that is helpful in any way.

patrick
  • 881
  • 2
  • 9
  • 32
3

place them in a table like this:

<table>
<tr>
<td><input id="finame" type="text" name="fname" placeholder="Firstname" /></td>le>
<td><input type="text" name="lname" placeholder="Lastname" /></td>
</tr>
</table>
  • Using tables is semantically incorrect. Using a display: table type of structure using CSS would be HIGHLY preferred here. You will run into a lot of problems in the future if you use . https://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html
    – Kris Boyd Apr 30 '19 at 16:42
0

The default behavior of input is inline, what you need to do is to set the width of both input elements to fit the width of the container

Here is your html in CodePen

Shhade Slman
  • 263
  • 2
  • 10