Я делаю фиктивную форму опроса и помещаю входные данные в flex-box столбца, но я хочу разделить поле имени между 'first' и 'last' и разделить их горизонтальное пространство. Я попытался заключить их в div и присвоить этому вложенному div свойство flex строки, но оно, похоже, переопределяется родительским flexbox, сохраняя их вертикально друг к другу. Как поставить поля ввода имени рядом?
<html>
<header>
Survey Form
</header>
<body>
<div class='container'>
<div class='form'>
<div class='inputCon'>
<div class='name'>Name</div>
<div class='firstLast'>
<input
type='text'
name='FirstName'
id='firstname'
placeholder='Enter your name'
required>
</div>
<input
type='text'
name='LastName'
id='lastname'
placeholder='Enter your name'
required>
</div>
</div>
<div class='inputCon'>
<div class='email'>Email</div>
<input
type='text'
name='email'
id='email'
placeholder='Enter your email address'
required>
</div>
<div class='inputCon'>
<div class='email'>Email</div>
<input
type='text'
name='email'
id='email'
placeholder='Enter your email address'
required>
</div>
</div>
</body>
</html>
<style>
html {
background-color: gray;
}
.container {
margin: 10px auto 10px auto;
height: 300px;
width: 350px;
display: flex;
flex-direction: column;
}
body {
background-image: linear-gradient(
115deg,
rgba(58, 58, 158, 0.8),
rgba(136, 136, 206, 0.7)),
url(https://images.unsplash.com/photo-1541233349642-6e425fe6190e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
#name{
width: 100%;
}
.inputCon{
display: flex;
flex-direction: column;
text-align: center;
margin: 20 120 20 0;
width: 100%;
}
.firstLast {
display: flex;
flex-direction: row;
}
input{
width: 100%;
text-align: center;
}
</style>