<div class="flex">
<form class="grid-container">
<input class="a" placeholder="Имя">
<input class="b" placeholder="Компания">
<input class="c" placeholder="Телефон">
<input class="d" placeholder="Email">
<textarea class="e">Сообщение</textarea>
<button type="submit">Отправить</button>
</form>
</div>
html,
body {
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 20px;
position: relative;
grid-template-areas:
"a a b b e e"
"c c d d e e";
}
.a {
grid-area: a;
}
.b {
grid-area: b;
}
.c {
grid-area: c;
}
.d {
grid-area: d;
}
.e {
grid-area: e;
resize: none;
}
.a,
.b,
.c,
.d,
.e {
background: #333;
color: #fff;
padding: 6px 4px;
box-sizing: border-box;
}
::placeholder {
color: #fff;
}
.grid-container button {
position: absolute;
bottom: -50px;
right: 0;
background: orange;
border: none;
outline: none;
padding: 10px 14px;
color: #fff;
cursor: pointer;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.