Darkness2019-01-17 09:30:21
Darkness, 2019-01-17 09:30:21

Again flex, again errors, who can give cuff?

How many times have I already run into a problem with these justify-content: center;
align-content: center; , therefore I demand a cuff and indicate where the error is.
This is a form (for educational purposes), it is not in a div or some other block, but simply in the body, but it is not centered! I do not think that the problem is in html tags, so I did not attach html code
Thanks for the help!

body {
    margin: 0 auto;
    width: 100%;
    height: 100%;
    background-color: #321de2;

#survey-form {
    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;
    width: 500px;
    height: 100%;
    background-color: #B7FF64;

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Sergey Goryachev, 2019-01-17

Are you trying to align the shape itself with flexes? Not this way.
Flexes are given to the parent, that is, if the form is in a body, write the rules for the body.
And all children will listen to these rules.

ljutaev, 2019-01-17

Hello. Read the book The New Big Book of CSS by D. McFarland 2016 flex section

Alexey Strekalov, 2019-01-17


Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question