How do I make the form fields beneath one another and not side by side? #148151
Answered
by
lemorage
Shivraj957
asked this question in
Code Search and Navigation
-
Repository: https://github.com/Shivraj957/indianmapwarmultigame/ |
Beta Was this translation helpful? Give feedback.
Answered by
lemorage
Dec 30, 2024
Replies: 1 comment 2 replies
-
Modify the form {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
For a bit of extra style, you might want to add these additional CSS rules: input, select {
width: 200px;
padding: 0.5rem;
font-size: 1rem;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Shivraj957
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modify the
<form>
section in your CSS, like the following:flex-direction: column
arranges them in a vertical column.align-items: center
puts them all in the center.gap: 1rem
adds spacing between form fields.For a bit of extra style, you might want to add these additional CSS rules: