Bad: [html] in html code i can’t make two form input in one row [closed]

You can, and I am going to show you how. As you can see, you have to make width of the <form> in style.css as shown. After you do that, for example, I put my whole <form> width to be 200px. It is going to stretch for 200px, so you have to make <input type="text,email,etc> tag, less than that. For example, if you want to have 2 <input> tags in 1 row, you have to put a unique ID to your <input> tag, as you can see, that I did in the style.css file. It has to be divided by 2, so 2 <input> tags can be inside, or it can be less. For example, if your width of a <form> is 200px, then your 2 <input> tags should have a width of 100px or lower, so they could fit inside of a row. If you have any more questions, feel free to ask, and welcome to Stack Overflow

form{
    width: 200px;
    height: 200px;
    border: solid 0.1px black;
}
input{
    border-radius: 5px;
    border: 0.1px solid grey;
}

#prvi{
    width: 60px;
    margin: 10px;
}
#drugi{
    width: 100px;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://stackoverflow.com/questions/70013589/style.css">
</head>
<body>
    <form>
        <h3><center>Practice</center></h3>
        <input id="prvi" type="text" placeholder="User ID"/><input id="drugi" type="email" placeholder="Email"/><br>
    </form>
</body>
</html>

Leave a Comment