R
R
Rulon Oboevv2018-05-16 11:00:38
css
Rulon Oboevv, 2018-05-16 11:00:38

How to set the registration form in the center of the site?

I think if I use
margin:auto;
witdh:xxpx;
then at different screen sizes it will be askew, I have not yet encountered such a task, I have already read it in Habré, it does not help.
5afbe51c75347570716763.png
this block is right in the middle

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
netrox, 2018-05-16
@the_guyfox

display:flex;
justify-content:center;
align-items:center;

D
Dmitry, 2018-05-17
@oxmad

There is another option without flex:

.container {
    position: relative;
}
.window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

Also specify the width and height respectively.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question