How to center form? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grátis
0

How to center form?

I was searching for that and I didn't find anything. How to do that?(without using JS and apsolut)

12th Jan 2019, 6:10 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
8 Respostas
0
Found here by searching CodePlayground: https://code.sololearn.com/W51CLpHyrWy0/?ref=app
12th Jan 2019, 6:44 PM
Kirk Schafer
Kirk Schafer - avatar
0
My form is "display: block;"
12th Jan 2019, 6:46 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
I just tried inserting a form at the spot the instructions indicate, then setting it to display:block. It still works / doesn't appear to affect the containing div. (Is the containing div strategy not acceptable?)
12th Jan 2019, 6:53 PM
Kirk Schafer
Kirk Schafer - avatar
0
I try it's not work
12th Jan 2019, 7:02 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
See code
12th Jan 2019, 7:02 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
12th Jan 2019, 7:08 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
Note, I'm recommending using this pattern, which is working for me: [HTML] <body> <div class="container"> <form> ... </form> <form> ... </form> </div> </body> [CSS] .container{ height: 100vh; display: flex; justify-content: center; align-items: center; }
12th Jan 2019, 7:38 PM
Kirk Schafer
Kirk Schafer - avatar
0
It doesn't for me. I don't know why
12th Jan 2019, 7:43 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar